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

super-constructor-call does not work for var args constructors

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 1.7.0
    • None
    • None
    • None
    • Win XP on AMD Turin 64, Eclipse Galileo, Sun Java VM 6u17

    Description

      I have attached a test case demonstrating this bug:

      class First declares a Constructor with var args string parameter
      class Second inherits this and declares a new constructor, which super-calls the var-args constructor with two strings (should work, since the original constructor can be called with two strings).
      however, the super-call throws a class cast exception because at some point groovy tries to cast one of the Strings to a String array, which of course is not possible.

      Attachments

        1. ConstructorTest.groovy
          0.5 kB
          Joscha Drechsler

        Issue Links

          Activity

            People

              Unassigned Unassigned
              misterd Joscha Drechsler
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: