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

inter- onstructor call "this ( ..) " makes 2nd object!

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-JSR-4
    • 1.0-JSR-6
    • class generator
    • None
    • n/a

    Description

      This was quite nasty to find the reason for my application failing but it simplifies nice and easy:
      Confirmed against latest JSR-5 snapshot.

      def a = new Two();
      println a;

      class Two{
      Two()

      { this("hello"); }

      Two(String dontMatter)

      { println this; }

      }

      E:\home>groovy A.groovy
      Two@30d82d
      Two@56f631

      Attachments

        1. A.groovy
          0.1 kB

        Activity

          People

            blackdrag Jochen Theodorou
            coltnz Colin Taylor
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: