Compile error in dsl with restricted C# keywords
Kobus-Smit opened this issue · comments
Kobus Smit commented
This dsl can't compile (and I think it did previously)
module Test {
aggregate XYZ {
string From;
specification FindBy 'it => it.From == from' {
string from;
}
}
}
Internal compiler error. Error compiling object model: Error during compilation:
Error: Invalid expression term 'select' in global::Test.XYZ.FindBy near: select it;
Error: A query body must end with a select clause or a group clause in global::Test.XYZ.FindBy near: ;
If I gen source using dsl-clc v1.9.3 then it all compiles fine, see [1]
My current workaround is to rename from
to fromm
.
zapov commented
This will work if you use correct C# syntax for it
it => it.From == @from
zapov commented
Actually... from is a LINQ only keyword :(
I've changed the compiler to avoid using LINQ expression for the problematic part.
It should work now :)
Kobus Smit commented
Works thx!