[rules-dev] binding to the same variable

Mark Proctor mproctor at codehaus.org
Tue May 15 01:06:23 EDT 2007


It was an incorrect behaviour initially introduced to help tooling, 
you'll notice that it was never documented as a feature, as it was 
always planned to remove it. So I guess you could say you found a 
"hidden" feature. In 3.0.x instead of disabling it, once the correct way 
was implemented, we left it in so as not to break anyones code. 
Obviously as we now move to 4.0 we can now correct this, and make this 
statement illegal.

Mark
Arjun Dhar wrote:
> In JBoss Rules 4 the multiple assignment of a variable to an object definition 
> gives an error, while it worked in 3.X. Not sure what's conceptually correct: 
> (Have not noticed any impact yet):
>
> rule "Collect Test" salience 70
>      when
>          $person      : Person( name == "Bob", $likes : likes )
>          $person      : Person( age== 42 )
>
> '$person' repeated twice!
>
> _______________________________________________
> rules-dev mailing list
> rules-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
>   




More information about the rules-dev mailing list