[jboss-jira] [JBoss JIRA] Commented: (JBRULES-2931) Regression: unqualified type in strict mode error

Laird Nelson (JIRA) jira-events at lists.jboss.org
Thu Mar 24 11:49:46 EDT 2011


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

Laird Nelson commented on JBRULES-2931:
---------------------------------------

This also fails with dialect "java".

> Regression: unqualified type in strict mode error
> -------------------------------------------------
>
>                 Key: JBRULES-2931
>                 URL: https://issues.jboss.org/browse/JBRULES-2931
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: drools-compiler (expert)
>    Affects Versions: 5.2.0.M1
>            Reporter: Laird Nelson
>            Assignee: Mark Proctor
>
> This (stupid) rule:
> {code}
> rule "Testing contains"
>   dialect "mvel"
>   when
>     Response( $answerSelections : answerSelections )
>     AnswerSelection( answer.ID in (2, 3) )
> #    AnswerSelection( answer.ID == 2 || == 3 )
> #    AnswerSelection( answer.ID == 2 || answer.ID == 3 )
>   then
>     System.out.println("Testing contains activated")
> end
> {code}
> ...produces this error message:
> {code}
> Unable to Analyse Expression answer.ID == 2 || answer.ID == 3:
> [Error: Failed to compile: 1 compilation error(s): 
>  - (1,9) unqualified type in strict mode for: ID]
> [Near : {... Unknown ....}]
>              ^
> [Line: 1, Column: 0] : [Rule name='Testing contains']
> {code}
> Response has a getAnswerSelections() method that returns a Collection type.  AnswerSelection has a getAnswer() method that returns an Answer.  Answer has a getID() method that returns an int.
> This rule compiled fine under Drools 5.1.1 and 5.2.0.M1 and fails under 5.2.0-SNAPSHOT.

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