groovy
  1. groovy
  2. GROOVY-3817

try {} block followed by list notation does not work, needs something else in between

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.5
    • Fix Version/s: 1.7-beta-2, 1.6.6
    • Component/s: parser
    • Labels:
      None
    • Environment:
      Linux schleppux2 2.6.28-15-generic #49-Ubuntu SMP Tue Aug 18 19:25:34 UTC 2009 x86_64 GNU/Linux
      (Ubuntu jaunty, ia32-jdk 1.6.0_16)
    • Number of attachments :
      0

      Description

      The following snippet does not work if the commented line is removed.

      try {
      println "nix"
      } catch ( Exception e ) {
      e.printStackTrace()
      }
      //
      println "auchnix" // remove this line to get an error
      (1..10).each

      { print it }

        Activity

        Hide
        Roshan Dawrani added a comment -

        Fixed by adjusting the relevant grammar rule a bit.

        Show
        Roshan Dawrani added a comment - Fixed by adjusting the relevant grammar rule a bit.

          People

          • Assignee:
            Roshan Dawrani
            Reporter:
            Patric Bechtel
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: