groovy

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

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0-JSR-4
  • Fix Version/s: 1.0-JSR-6
  • Component/s: class generator
  • Labels:
    None
  • Environment:
    n/a
  • Testcase included:
    yes
  • Number of attachments :
    1

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

Activity

Hide
blackdrag blackdrag added a comment -

fixed

Show
blackdrag blackdrag added a comment - fixed

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: