n_c
(nc)
March 17, 2018, 9:08pm
1
Since about snapshot #1228 I get for
val x0 = rs1.members.filter[s|s.state == 0].size
Invalid number of arguments. The method filter(Iterable, Function1<? super T, Boolean>) is not applicable for the arguments (Set)
and
2018-03-17 21:40:45.399 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model ‘tmp.rules’ has errors, therefore ignoring it: [11,32]: mismatched character ‘|’ expecting ‘]’
[11,47]: mismatched input ‘]’ expecting ‘end’
[13,32]: mismatched character ‘|’ expecting ‘]’
What’s to do?
1 Like
Jusst a guess: Add spaces between [ and ]
val x0 = rs1.members.filter[ s | s.state == 0 ].size
3 Likes
n_c
(nc)
March 17, 2018, 9:20pm
3
Thanks, that was very quick and easy.
Noddy
(Norbert Meier)
March 18, 2018, 9:29am
4
After updating yesterday to build 1231, I get similar errors. That change get all my rules running again.
Thanks Udo
Edit:
Why this change was done in the rule engine?
I’m pretty sure that this was not on purpose. Maybe a side effect of unit support, as units have to be set through [] either (but as always: just a guess).
rlkoshak
(Rich Koshak)
March 18, 2018, 9:10pm
6
This definitely needs to be addressed in the release notes and possibly the docs before 2.3 release. It is a breaking change and will hot a lot of people unexpectedly.
1 Like
I do not want to take credits for this…
You need to add a space after [ and before ].