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

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.x
    • Fix Version/s: None
    • Component/s: parser-antlr4
    • Labels:
      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

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

              Dates

              • Created:
                Updated: