Mercurial > projects > ldc
diff test/classes8.d @ 15:37a4fdab33fc trunk
[svn r19] * Added support for reassigning 'this' inside class constructors.
* Added preliminary support for UnrolledLoopStatement. That is foreach on a tuple.
author | lindquist |
---|---|
date | Wed, 03 Oct 2007 04:56:32 +0200 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/classes8.d Wed Oct 03 04:56:32 2007 +0200 @@ -0,0 +1,22 @@ +class A { + int i; + int l; + this(bool b,bool b2=false) { + if (b) this = new B; + i = 4; + if (b2) this = new C; + l = 64; + } +} +class B : A{ + this() { + super(false); + } +} +class C : A{ + this() { + super(false); + } +} +void main() { +}