
source("TestHarness.bsh");

class FooChild extends Base 
{
	int y = 42;

	FooChild() { 
		assert( y == 42 );
		y = 43;
		assert( y == 43 );
		assert( this.y == 43 );
	}

	FooChild( String s ) { super(s); }

	FooChild( int i ) { super(i); }

	FooChild( String s, int i ) { this(s,i,99); }

	FooChild( String s, int x, int y ) 
	{ 
		super(s,x); 
		assert( this instanceof FooChild );
		assert( this.y == 42 );
		assert( y == 99 );
		this.y = y;
		assert( y == 99 );
		assert( this.y == 99 );
	}
}

f = new FooChild();
assert( f.s == null && f.i == 0 );
assert( f.y == 43 );

f = new FooChild("foo");
assert( f.s.equals("foo") && f.i == 0 );

f = new FooChild(42);
assert( f.s == null && f.i == 42 );

f = new FooChild("bar", 42);
assert( f.s.equals("bar") && f.i == 42 );
assert( f.y == 99 );

complete();
