Community
Participate
Working Groups
The type of a Query is not checked against the type of its expression. For instance, the queries [query public aQuery(e : Class) : String = Set{} /] [query public anotherQuery(e : Class) : String = true /] [query public anotherQuery2(e : Class) : Set(String) = Sequence{''} /] do not throw compilation errors although they should. The side effect of this bug is that Acceleo queries are typed with the OclExpression's type and not the type of the query. Regards, Mikael
Priority has changed
We won't fix that for Helios because it is more complicated than we expected. But, we'll plan to do that for Acceleo 3.1 M1. The problem is more general when we use OCL expressions in variable declaration, statements or queries. [myExpr/] -> We should check that myExpr is a String [protected(myExpr)/] -> We should check that myExpr is a String [query public myQuery(myClass : Class) : Element = myClass/] must compile because myClass is kind of Element We also change the priority
Query type will be checked and possible errors will be reported with a warning. Contributed on head and available in Acceleo 3.1.0 M5.