Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-95

Evaluation fails after the first subscript operator

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-beta-2
    • 1.0-beta-3
    • None
    • None

    Description

      After a subscript operator is encountered, expression evaluation seems to stop.

      For example, if we have the following map:

      a = ['out1':['in1':1, 'in2':2], 'out2':3]

      The following expression evaluates correctly to 1:
      a.out1.in1

      This expression evaluates to null:
      a['out1'].in1

      And this evaluates to ["in1"]:
      a['out1']['in1']

      The same thing happens when using the subscript operator on a List of Java objects; the expression fails to evaluate correctly after the first subscript operator is encountered.

      Attachments

        Activity

          People

            Unassigned Unassigned
            rodcope Rod Cope
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: