nitra
nitra copied to clipboard
AST: Cannot access property of an object
This code produces an compilation error:
namespace Test.Ast
{
ast Foo
{
in Test1 : string;
in Test2 : string;
in Test3 : string;
Test1 = StringWrapper("Test").Attribute;
Test2 = StringWrapper("Test").Method();
Test3 = StringWrapper("Test").Property; // error : Unexpected expression 'Test.StringWrapper ("Test")' Call
}
}
The string wrapper looks like this:
namespace Test
{
[Record(Include=[Attribute])]
class StringWrapper
{
public Attribute : string;
public Property : string { get { Attribute } }
public Method() : string
{
Attribute
}
}
}
}
}