Wolfgang,
Thank you for reporting. Mario is fixing it.
On a related note, for Drools 5, for backward compatibility, we still
allowed bindings in the middle of expressions. We were discussing if this
should be disallowed from Drools 6 forward? Things like:
Person( $name : name == "Bob" || $alive : isAlive && ($age : age > 40
) )
Things get quite complicated and a bit hard to read as expressions get
more complex. It also clashes with the ternary operator ?:.
Any thoughts on retaining support for this kind of syntax or removing
it?
Edson
On Mon, Feb 18, 2013 at 7:45 AM, Wolfgang Laun <wolfgang.laun(a)gmail.com>wrote:
Below is a self-contained DRL which should not compile because the
sum
isn't a boolean expression. (Note that omitting "$x:" results in the
correct diagnostic "predicate ... must be a boolean".)
declare Foo
a: double
b: double
end
rule what
when
$c: Foo( $x: a + b )
then
System.out.println( "foo: " + $c );
end
_______________________________________________
rules-dev mailing list
rules-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev
--
Edson Tirelli
JBoss Drools Core Development
JBoss by Red Hat @
www.jboss.com