annotate run/o/odd_bug_03_B.d @ 579:414368950454

catchup 1/3
author thomask
date Sat, 11 Jun 2005 16:25:27 +0000
parents
children 9dcac8d4e97f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
579
414368950454 catchup 1/3
thomask
parents:
diff changeset
1 // $HeadURL$
414368950454 catchup 1/3
thomask
parents:
diff changeset
2 // $Date$
414368950454 catchup 1/3
thomask
parents:
diff changeset
3 // $Author$
414368950454 catchup 1/3
thomask
parents:
diff changeset
4
414368950454 catchup 1/3
thomask
parents:
diff changeset
5 // @desc@ vararg / char[] / foreach code generation bug
414368950454 catchup 1/3
thomask
parents:
diff changeset
6 // @author@ zwang <nehzgnaw@gmail.com>
414368950454 catchup 1/3
thomask
parents:
diff changeset
7 // @date@ 2005-05-29
414368950454 catchup 1/3
thomask
parents:
diff changeset
8 // @uri@ news:d7d2kq$1mc$1@digitaldaemon.com
414368950454 catchup 1/3
thomask
parents:
diff changeset
9
414368950454 catchup 1/3
thomask
parents:
diff changeset
10 // @WARNING@ direct use of Phobos
414368950454 catchup 1/3
thomask
parents:
diff changeset
11
414368950454 catchup 1/3
thomask
parents:
diff changeset
12 module dstress.run.o.odd_bug_03_B;
414368950454 catchup 1/3
thomask
parents:
diff changeset
13
414368950454 catchup 1/3
thomask
parents:
diff changeset
14 import std.format;
414368950454 catchup 1/3
thomask
parents:
diff changeset
15
414368950454 catchup 1/3
thomask
parents:
diff changeset
16 const char[] culprit;
414368950454 catchup 1/3
thomask
parents:
diff changeset
17
414368950454 catchup 1/3
thomask
parents:
diff changeset
18 void f(...){
414368950454 catchup 1/3
thomask
parents:
diff changeset
19 char[] s;
414368950454 catchup 1/3
thomask
parents:
diff changeset
20
414368950454 catchup 1/3
thomask
parents:
diff changeset
21 void putc(dchar c){
414368950454 catchup 1/3
thomask
parents:
diff changeset
22 s ~= c;
414368950454 catchup 1/3
thomask
parents:
diff changeset
23 }
414368950454 catchup 1/3
thomask
parents:
diff changeset
24
414368950454 catchup 1/3
thomask
parents:
diff changeset
25 std.format.doFormat(&putc, _arguments, _argptr);
414368950454 catchup 1/3
thomask
parents:
diff changeset
26
414368950454 catchup 1/3
thomask
parents:
diff changeset
27 assert(s=="mystery");
414368950454 catchup 1/3
thomask
parents:
diff changeset
28 }
414368950454 catchup 1/3
thomask
parents:
diff changeset
29
414368950454 catchup 1/3
thomask
parents:
diff changeset
30 int main(){
414368950454 catchup 1/3
thomask
parents:
diff changeset
31 f("mystery");
414368950454 catchup 1/3
thomask
parents:
diff changeset
32 return 0;
414368950454 catchup 1/3
thomask
parents:
diff changeset
33 }