[jboss-jira] [JBoss JIRA] (DROOLS-43) Binding makes parser accept non-boolean constraint
Davide Sottara (JIRA)
jira-events at lists.jboss.org
Mon Sep 9 03:09:03 EDT 2013
[ https://issues.jboss.org/browse/DROOLS-43?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12802647#comment-12802647 ]
Davide Sottara commented on DROOLS-43:
--------------------------------------
This is an extremely bad parser bug.. it tries to assign the value of the expression to $x (which may be fine), but unfortunately the DRLExpression parser only considers the first atomic expression (a) and ignores all the rest
> Binding makes parser accept non-boolean constraint
> --------------------------------------------------
>
> Key: DROOLS-43
> URL: https://issues.jboss.org/browse/DROOLS-43
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Reporter: Mario Fusco
> Assignee: Mario Fusco
>
> 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".)
> {code}
> declare Foo
> a: double
> b: double
> end
> rule what
> when
> $c: Foo( $x: a + b )
> then
> System.out.println( "foo: " + $c );
> end
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list