Details
-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
7.71.0.Final
-
None
-
2022 Week 26-28 (from Jun 27), 2022 Week 29-31 (from Jul 18), 2022 Week 41-43 (from Oct 10)
-
Workaround Exists
-
-
NEW
-
NEW
-
---
-
---
Description
Rule like this:
rule Hello1 when $list : List() $p : Person() then $list.stream().forEach((i) -> {System.out.println("Here");}); modify($p) { setAge(100); }; end
throws a compilation error:
Rule Compilation error : [Rule name='Hello1'] $p cannot be resolved to a variable Syntax error, insert ";" to complete Statement The method setAge(int) is undefined for the type Rule_Hello1952063464
with non-exec-model.
On the other hand, Lambda without a block works:
$list.stream().forEach(i -> System.out.println("Here"));