in Collection<T>
getAll() returns a Collection type.
var m = getAll()list(e in m) where available == true) {
}vs
list(e in getAll() where available == true) {
}The first one works but the second doesn’t. Is it a decision of yours to only allow entity and var in there or is it a bug?
Submitted by Terje Pedersen on 31 March 2011 at 11:36
Issue Log
Yeah, that’s a tricky issue. The kinds of expressions you can write left of query filters is limited to avoid ambiguity. However why a variable, method call etc. is allowed an not a function call seems kind of arbitrary. I’ll have to do some testing, but I think I can allow function calls as well.
For now (although it’s ugly) you can put brackets around it:
list(e in (getAll()) where available == true) {
}
Brackets around it ended in an error the application line 0, Analysis failed org.strategoxt.imp.runtime.analysismarker when I saved the file.
Strange, if I change something like adding and removing a space and take another save the error disappear.
Another thing using (getAll()) no errors is given but it doesn’t create the index html file.
Will be fixed in 0.4.3.
Log in to post comments