I get an error stating that a ';' is expected after the if statement when I try to compile the following code.
if( true )
MyHandle @handle = cast<MyHandle>(object.getMyHandle("MyHandleName"));
However if I change the code like this, the error goes away.
MyHandle @handle;
if( true )
@handle = cast<MyHandle>(object.getMyHandle("MyHandleName"));
The error also goes away if I change the code like this.
if( true )
{
MyHandle @handle = cast<MyHandle>(object.getMyHandle("MyHandleName"));
}
Is this maybe a bug in the compiler??