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

left paren must be on same line as throw exception declaration

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0-JSR-1, 1.0-JSR-2
    • 1.0-JSR-3
    • lexer, syntax
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: