Mercurial > projects > ldc
view tests/mini/classes13_bug239.d @ 1596:42fc0d955a0d
Updated runtest to always rebuild libtangobos-partial.a in case of updates.
Changed std.stdarg to import ldc.vararg so it has the correct implementation.
author | Robert Clipsham <robert@octarineparrot.com> |
---|---|
date | Sun, 15 Nov 2009 13:22:02 +0000 |
parents | 9d308feaec27 |
children |
line wrap: on
line source
extern(C) int printf(char*, ...); class A { bool Afoo = false; void foo() { Afoo = true; } } class B : A {} class C : B { bool Cfoo = false; void foo() { Cfoo = true; } } void main() { scope c1 = new C(); c1.foo(); assert(c1.Cfoo && !c1.Afoo); scope c2 = new C(); c2.B.foo(); assert(!c2.Cfoo && c2.Afoo); scope c3 = new C(); c3.A.foo(); assert(!c3.Cfoo && c3.Afoo); }