-
Bug
-
Resolution: Done
-
Major
-
7.0.0.Beta5
-
None
-
NEW
-
NEW
This fails with $p cannot be resolved to a variable:
rule R when Cheese($p : price) then int b = (int) ($p * 1_000.0); // FAILS, because $p cannot be resolved ?! end
That error message is nonsense. It should just work. If it doesn't due to ECJ, it should say something like "cannot be cast".
This works in java:
int a = 42; int b = ((int) (a * 1_000.0));
Removing the underscore fixes it:
rule R when Cheese($p : price) then int b = (int) ($p * 1000.0); // SUCCESS end
Regardless of an upstream ECJ problem (which should be reported if that's indeed the problem), the error message is wrong and send me on a wild goose hunt.