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

left paren must be on same line as throw exception declaration

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0-JSR-1, 1.0-JSR-2
    • Fix Version/s: 1.0-JSR-3
    • Component/s: lexer, syntax
    • Labels:
      None
    • Environment:
      gentoo linux using sun jdk 1.5.0.03

      Description

      // following throw is legal syntax in java and in groovy
      throw new IllegalArgumentException( " Left paren on same line compiles OK" )

      // following throw is legal syntax in java but NOT in groovy
      throw new IllegalArgumentException
      ( " Left paren on next line causes syntax error" )

      // Above generates following syntax error:
      unexpected token: <newline> @ line 71, column 44.
      new IllegalArgumentException
      ^

        Attachments

          Activity

            People

            • Assignee:
              blackdrag Jochen Theodorou
              Reporter:
              feester James Pfister
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: