Issue Details (XML | Word | Printable)

Key: NUCCORE-473
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Andy Jefferson
Reporter: Andy Jefferson
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
DataNucleus Core

Generic compile of JDOQL "collField.contains(var) && var == value" compiled incorrectly

Created: 26/Feb/10 06:31 PM   Updated: 17/Mar/10 08:54 PM   Resolved: 26/Feb/10 09:53 PM
Component/s: Queries
Affects Version/s: 2.0.0.release, 2.0.1
Fix Version/s: 2.0.2


 Description  « Hide
The JDOQL filter "collField.contains(var) && var == value" is compiled to
DyadicExpression
{
    InvokeExpression{[PrimaryExpression{this.names}].contains(VariableExpression{var})}
    AND
    DyadicExpression
    {
        PrimaryExpression{var}
        =
        PrimaryExpression{this.name}
    }
}

The second use of "var" is a PrimaryExpression yet should be a VariableExpression.

Andy Jefferson added a comment - 26/Feb/10 09:53 PM
SVN trunk fixes this; was adding the first position of the variable as a VariableExpression but its symbol was of wrong type in SymbolTable, and then wasn't checking on the type when binding the next occurrence

Andy Jefferson made changes - 26/Feb/10 09:53 PM
Field Original Value New Value
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Andy Jefferson made changes - 26/Feb/10 09:53 PM
Fix Version/s 2.0.2 [ 10874 ]
Andy Jefferson made changes - 17/Mar/10 08:54 PM
Status Resolved [ 5 ] Closed [ 6 ]