[
https://issues.jboss.org/browse/JBRULES-2931?page=com.atlassian.jira.plug...
]
Laird Nelson updated JBRULES-2931:
----------------------------------
Description:
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.
was:
This (stupid) rule:
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
...produces this error message:
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']
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.
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