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

super-constructor calling bug

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.0-beta-5
    • None
    • None

    Description

      Jason Thomas spotted this...

      I'm getting errors when over-riding a java constructor in a groovy
      class:

      TestBase.java:

      public class TestBase {
      public TestBase(String s)

      { System.out.println("calling TestBase constructor"); }

      public static void main(String[] args)

      { new Test("string"); }

      }

      Test.groovy:

      class Test extends TestBase {
      Test(String message)

      { super(message) }

      }

      java.lang.NoSuchMethodError: TestBase.<init>(Ljava/lang/Object;)V
      at Test.<init>(C:\benchmark\groovy\Test.groovy:3)
      at TestBase.main(TestBase.java:7)
      Exception in thread "main"

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jstrachan James Strachan
              Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: