[jboss-jira] [JBoss JIRA] Closed: (JBRULES-554) False "Duplicate declaration for variable" error when doing "Match( homeTeam == $team) || Match( awayTeam == $team)"
Edson Tirelli (JIRA)
jira-events at lists.jboss.org
Wed Feb 21 10:16:35 EST 2007
[ http://jira.jboss.com/jira/browse/JBRULES-554?page=all ]
Edson Tirelli closed JBRULES-554.
---------------------------------
Fix Version/s: 3.1-m2
Resolution: Done
Improved variable scope resolution for logical branches and commited to trunk on revision #9676. Test cases added.
$ svn log -r 9676 -v
------------------------------------------------------------------------
r9676 | tirelli | 2007-02-21 12:08:42 -0300 (Wed, 21 Feb 2007) | 1 line
Changed paths:
M /labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/descr/AndDescr.java
M /labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/semantics/java/builder/ColumnBuilder.java
M /labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java
M /labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/RuleParserTest.java
M /labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/descr/AndDescrTest.java
A /labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_duplicateVariableBinding.drl
A /labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_duplicateVariableBindingError.drl
D /labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/lang/multiple_bindings.drl
D /labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/lang/multiple_bindings_more.drl
M /labs/jbossrules/trunk/drools-core/src/main/java/org/drools/spi/DeclarationScopeResolver.java
JBRULES-554: fixing variable scope resolution in the rule parser/builder
------------------------------------------------------------------------
> False "Duplicate declaration for variable" error when doing "Match( homeTeam == $team) || Match( awayTeam == $team)"
> --------------------------------------------------------------------------------------------------------------------
>
> Key: JBRULES-554
> URL: http://jira.jboss.com/jira/browse/JBRULES-554
> Project: JBoss Rules
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Drl Parser/Builder
> Affects Versions: 3.0.4
> Reporter: Geoffrey De Smet
> Assigned To: Edson Tirelli
> Priority: Minor
> Fix For: 3.1-m2
>
> Attachments: JBRULES-554-testcase-branch-3.0.x.patch
>
>
> [Maybe assign to Edson, he asked me to open in mailing list thread "Yet another or question"]
> On the 3.0.x branch (update from this time) when declaring this rule:
> query "multipleMatchesPerTeamPerDay"
> $team : Team();
> Match( $id : id, homeTeam == $team, $day : day )
> || Match( $id : id, awayTeam == $team, $day : day );
> exists Match( id > $id, homeTeam == $team, day == $day )
> || exists Match(id > $id, awayTeam == $team, day == $day );
> end
> It reports an error:
> org.drools.rule.InvalidRulePackage: Duplicate declaration for variable '$day' in the rule 'multipleMatchesPerTeamPerDay'
> Testcase patch coming up.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list