[jboss-jira] [JBoss JIRA] Commented: (JBRULES-2968) mistake in determining the type of an eval expression

Mark Proctor (JIRA) jira-events at lists.jboss.org
Sat Apr 23 07:18:18 EDT 2011


    [ https://issues.jboss.org/browse/JBRULES-2968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12597685#comment-12597685 ] 

Mark Proctor commented on JBRULES-2968:
---------------------------------------

This is another MVEL regression. I have made a unit test and put in a pull request to the MVEL author.

> 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
>
> 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