[jboss-jira] [JBoss JIRA] Resolved: (JBRULES-2968) mistake in determining the type of an eval expression
Mark Proctor (JIRA)
jira-events at lists.jboss.org
Mon May 16 20:10:01 EDT 2011
[ https://issues.jboss.org/browse/JBRULES-2968?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Proctor resolved JBRULES-2968.
-----------------------------------
Fix Version/s: 5.2.0.CR1
Resolution: Done
pretty sure this was fixed in latest MVEL, please re-open if it's not.
> mistake in determining the type of an eval expression
> -------------------------------------------------------
>
> Key: JBRULES-2968
> URL: https://issues.jboss.org/browse/JBRULES-2968
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: drools-compiler (expert)
> Affects Versions: 3.0.1
> Reporter: Wolfgang Laun
> Assignee: Mark Proctor
> Priority: Blocker
> Fix For: 5.2.0.CR1
>
>
> This rule compiled correctly a few weeks ago where MyDate contains the int field "year":
> rule "Day in leap year"
> when
> $d: MyDate( $y: year, eval( $y % 4 == 0 && $y % 100 != 0 || $y % 400 == 0 ) )
> then
> System.out.println( $d.toString() + " is in a leap year" );
> end
> But now errors are reported:
> Unable to build expression for 'inline-eval' : [Error: was expecting type: java.lang.Boolean; but found type: java.lang.Integer]
> [Near : {... $y % 4 == 0 && $y % 100 != 0 || $y % 400 == 0 ....}]
> ^
> [Line: 1, Column: 46]' $y % 4 == 0 && $y % 100 != 0 || $y % 400 == 0 '
> [Error: was expecting type: java.lang.Boolean; but found type: java.lang.Integer]
> [Near : {... $y % 4 == 0 && $y % 100 != 0 || $y % 400 == 0 ....}]
> ^
> [Line: 1, Column: 46] : [Rule name='Day in leap year']
> [Error: was expecting type: java.lang.Boolean; but found type: java.lang.Integer]
> [Near : {... $y % 4 == 0 && $y % 100
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list