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

Unsupport Classic for loop now reports strange error message

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • None
    • 1.1-beta-2
    • None
    • None

    Description

      Using the classic for loop from java like:

      for(int i = 0; i < 60;i++) {
      println i
      }

      produces the error:

      Script1.groovy: 67: Unexpected node type: TYPE found when expecting type: an identifier at line: 67 column: 32. File: Script1.groovy @ line 67, column 32.
      1 Error

      Which is not very helpful for those who don't know it is not supported.. a nice error message at a minium would be good.. ideally it should dynamically inspect the AST and suggest what you should use

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            graemerocher Graeme Rocher
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: