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

Method call expression parsed differently in 1.8 compared to 1.7

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 1.8.0, 1.8.1, 1.9-beta-1
    • 1.8.4, 2.0-beta-1
    • parser-antlr2
    • None

    Description

      Some method call expressions are parsed differently in 1.8 compared to 1.7. This causes one of Gradle's AST transforms to fail. According to Jochen, this looks like a bug in the 1.8 ANTLR grammar.

      task copy(type: Copy) { x = 10 }
      g1.7: this.task(this.copy(...))
      g1.8: this.task(this.copy(...))
      
      task copy(type: Copy) { println 10 }
      g1.7: this.task(this.copy(...))
      g1.8: task.copy(...)
      

      The first expression is parsed the same in 1.7 and 1.8, but the second expression is parsed differently.

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            pniederw Peter Niederwieser
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: