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

New line between constructor call and {}

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.0.0-alpha-3
    • None
    • parser-antlr4
    • None

    Description

      new A() 
      {}
      

      is parsed as this.(new A())({}) i.e. method call with constructor call as method expression.
      This results in invocation of whatever `#toString()` returns which doesn't make sense.

      In older version it was parsed as new A().call({}).

      Attachments

        Activity

          People

            Unassigned Unassigned
            daniilo Daniil Ovchinnikov
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: