[rules-users] Suspicious behaviour when using a bound variable as a constraint in a pattern bound to the same var

2014-05-22 Thread dec
Due to a bug we came up with the following rule: /* Rule intriguing when $foo: Foo( $foo.getBar() == null ) then ... */ Our original intention was to actually generate the rule like so: /* Rule intended when $foo: Foo( bar == null ) then ... */ In most cases the

Re: [rules-users] Suspicious behaviour when using a bound variable as a constraint in a pattern bound to the same var

2014-05-22 Thread Wolfgang Laun
Please don't write any more posts like this. You aren't asking a question, as far as I can see - so why do you post? You write, darkly, about suspicions of wrong or unexpected results (which, to be sure, isn't the same thing). This is a big help. -W On 22/05/2014, dec roni.frant...@gmail.com

Re: [rules-users] Suspicious behaviour when using a bound variable as a constraint in a pattern bound to the same var

2014-05-22 Thread Wolfgang Laun
1. The constraints are equivalent. $foo is bound to the Foo object, and the getter does what the getter is supposed to do, and it's (probably) visible - so why shouldn't it compile. Version 5.3 or maybe even 5.2 has introduced general boolean expressions - are you using an older version? I don't