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

On 31 March 2011 at 11:44 Zef Hemel commented:

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) {
}


On 31 March 2011 at 11:44 Zef Hemel tagged 0.4.3

On 31 March 2011 at 12:18 Terje Pedersen commented:

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.


On 31 March 2011 at 12:24 Terje Pedersen commented:

Another thing using (getAll()) no errors is given but it doesn’t create the index html file.


On 11 April 2011 at 15:21 Zef Hemel tagged 0.4.3

On 11 April 2011 at 15:21 Zef Hemel commented:

Will be fixed in 0.4.3.


On 11 April 2011 at 15:21 Zef Hemel closed this issue.

Log in to post comments