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

[Parrot] bitwise or followed by closure on next line parsed as command expression

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.x
    • None
    • parser-antlr4
    • None

    Description

      This code:

      a | b
      {it -> true} ()

      will be parsed at 2.5.5 as two independent expressions:

      a | b 
      { java.lang.Object it -> true}.call()
      

      and will be parsed at 3.0.0-rc-1 as single expression:

      a | this.b({ java.lang.Object it -> true }).call()
      

      I believe this expression should be parsed same way in both versions.

      Spock depends on structure of ast for these kind of expressions. 

      Attachments

        Activity

          People

            Unassigned Unassigned
            Alexey Afanasiev Alexey Afanasiev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: