MyString = public class mapped to String
property MyLength: Integer; mapped to Length;
end;
but that doesnt compile on .net
E: Class member expected but “mapped” found [/Users/JohnMoshakis/Documents/develop/Echoes/Core/ConsoleApplication25/Program.pas (15)]
-> Phase Resolving Bodies started.
E: Property needs an expression for read or write member [/Users/JohnMoshakis/Documents/develop/Echoes/Core/ConsoleApplication25/Program.pas (15)]
Curious. that does look like the correct syntax — and I see it used all over the place in, say, RTL2, but I can reproduce that your case fails. Seems like a bug, I’ll log for next week.
It seems the docs where wrong for this; direct mapping is only supported for methods, because there is read and write involved for properties… The proepr syntax for properties would be