view run/constructor_02.d @ 70:5f98d4a33d49

1) review of all test cases with unexpected results (except encoding and html/xml) 2) updated todo
author thomask
date Sat, 23 Oct 2004 22:47:47 +0000
parents de27ca625bf7
children 659bb018c489
line wrap: on
line source

// @author@	Bastiaan Veelo <Bastiaan.N.Veelo@ntu.no>
// @date@	2004-09-21
// @uri@	news://cip39j$v4s$1@digitaldaemon.com
// @url@	nttp://digitalmars.com/digitalmars.D.bugs:1890

module dstress.run.constructor_02;

int status;

template ctor(){
	this(){
		this(2);
	}
	this(int i){
		status+=i;
	}
}

class MyClass{
	mixin ctor;
}

int main(){
	assert(status==0);
	MyClass object = new MyClass();
	assert(status==2);
	object = new MyObject(3);
	assert(status==5);
	return 0;
}