# HG changeset patch # User thomask # Date 1118507127 0 # Node ID 41436895045456a098982c816d481d77b19a30a8 # Parent 978a083bb0d0740d673910bb427e68044b8ce096 catchup 1/3 diff -r 978a083bb0d0 -r 414368950454 run/c/class_16.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/c/class_16.d Sat Jun 11 16:25:27 2005 +0000 @@ -0,0 +1,27 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @desc@ class inheritance recoursion +// @author@ Andrew Fedoniouk +// @date@ 2005-06-09 +// @uri@ news:d88kv9$he4$1@digitaldaemon.com + +module dstress.run.c.class_16; + +class A{ + class B:A{ + const int C = 5; + } +} + +int main(){ + assert(A.B.C==5); + assert(A.B.B.C==5); + assert(A.B.B.B.C==5); + assert(A.B.B.B.B.C==5); + assert(A.B.B.B.B.B.C==5); + assert(A.B.B.B.B.B.B.C==5); + assert(A.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.C*A.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.B.C==25); + return 0; +} \ No newline at end of file diff -r 978a083bb0d0 -r 414368950454 run/o/odd_bug_03_A.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/o/odd_bug_03_A.d Sat Jun 11 16:25:27 2005 +0000 @@ -0,0 +1,36 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @desc@ vararg / char[] / foreach code generation bug +// @author@ zwang +// @date@ 2005-05-29 +// @uri@ news:d7d2kq$1mc$1@digitaldaemon.com + +// @WARNING@ direct use of Phobos + +module dstress.run.o.odd_bug_03_A; + +import std.format; + +const char[] culprit; + +void f(...){ + char[] s; + + void putc(dchar c){ + s ~= c; + } + + std.format.doFormat(&putc, _arguments, _argptr); + + foreach(char ch; s){ + } + + assert(s=="mystery"); +} + +int main(){ + f("mystery"); + return 0; +} \ No newline at end of file diff -r 978a083bb0d0 -r 414368950454 run/o/odd_bug_03_B.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/o/odd_bug_03_B.d Sat Jun 11 16:25:27 2005 +0000 @@ -0,0 +1,33 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @desc@ vararg / char[] / foreach code generation bug +// @author@ zwang +// @date@ 2005-05-29 +// @uri@ news:d7d2kq$1mc$1@digitaldaemon.com + +// @WARNING@ direct use of Phobos + +module dstress.run.o.odd_bug_03_B; + +import std.format; + +const char[] culprit; + +void f(...){ + char[] s; + + void putc(dchar c){ + s ~= c; + } + + std.format.doFormat(&putc, _arguments, _argptr); + + assert(s=="mystery"); +} + +int main(){ + f("mystery"); + return 0; +} \ No newline at end of file diff -r 978a083bb0d0 -r 414368950454 run/o/odd_bug_03_C.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/o/odd_bug_03_C.d Sat Jun 11 16:25:27 2005 +0000 @@ -0,0 +1,31 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @desc@ vararg / char[] / foreach code generation bug +// @author@ zwang +// @date@ 2005-05-29 +// @uri@ news:d7d2kq$1mc$1@digitaldaemon.com + +// @WARNING@ direct use of Phobos + +module dstress.run.o.odd_bug_03_C; + +import std.format; + +void f(...){ + char[] s; + + void putc(dchar c){ + s ~= c; + } + + std.format.doFormat(&putc, _arguments, _argptr); + + assert(s=="mystery"); +} + +int main(){ + f("mystery"); + return 0; +} \ No newline at end of file