nitra
nitra copied to clipboard
AST: Cannot use implicit cast
Using an implicit cast when assigning some property results in a compilation error:
namespace Test.Ast
{
ast Foo
{
in Test1 : string;
Test1 = StringWrapper("Test"); // error : Unexpected expression 'this.Test1 = (macro_Nitra.PExprAnchorMacro:
} // DEBUG_INFO(Test.StringWrapper ("Test")) :> string)' Assign
}
namespace Test
{
[Record]
class StringWrapper
{
private Value : string;
public static @:(sw : StringWrapper) : string
{
sw.Value
}
}
}
A type cast not yet supported. Use a method call instead.