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

"static final" constructors should be a Compile-time error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.4
    • 1.8.5, 2.0-beta-2
    • class generator
    • None

    Description

      Some modifiers on the constructor should be disallowed instead of being passed to the init method. For example "static":

      class Foo {
      static final Foo()

      { println 'it works!' }

      }

      This creates a method <init> with modifiers of 0x19, which are static public and final. Not valid for a constructor. This should bomb at compile time instead of generating bytecode.

      Attachments

        Activity

          People

            roshandawrani Roshan Dawrani
            shemnon Daniel Ferrin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: