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

Reassignment of args parameter fails in main method

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.0-JSR-2
    • 1.0
    • None
    • None
    • Windows XP Professional Service Pack 2, groovy jsr02, java 1.4.2_08-b03

    Description

      Try this:

      class Foo {

      static void main(args)

      { args = 0 println(args.class) assert args instanceof Integer }

      }

      In plain English, reassigning to the args parameter does nothing. I think it should either fail w/ exception (if it is illegal to assign to this (or all?) parameters) or make the assignment, not silently ignore it.

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            antti.karanta@napa.fi Antti Karanta
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: