annotate run/d/delegate_19_A.d @ 1320:daef239f37cf

sed'ed replacement of new:...http.d.puremagic.com/issues/ with http://d.puremagic.com/issues/show_bug.cgi?...
author thomask
date Sun, 31 Dec 2006 19:59:08 +0000
parents 48fc88ca588a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1123
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
1 // $HeadURL$
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
2 // $Date$
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
3 // $Author$
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
4
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
5 // @author@ <someidiot@earthlink.net>
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
6 // @date@ 2006-08-23
1320
daef239f37cf sed'ed replacement of new:...http.d.puremagic.com/issues/ with http://d.puremagic.com/issues/show_bug.cgi?...
thomask
parents: 1123
diff changeset
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=306
1123
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
8 // @desc@ [Issue 306] New: dmd 165 breaks existing code
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
9
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
10 module dstress.run.d.delegate_19_A;
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
11
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
12 int status;
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
13
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
14 void append (char[] content){
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
15 status++;
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
16 }
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
17
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
18 void append (char[] delegate() dg){
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
19 status--;
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
20 }
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
21
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
22 int main(){
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
23 char[] s = "abc";
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
24
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
25 char[] dummy(){
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
26 return "123";
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
27 }
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
28
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
29 append(s);
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
30 if(status != 1){
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
31 assert(0);
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
32 }
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
33
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
34 append(dummy);
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
35 if(status != 2){
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
36 assert(0);
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
37 }
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
38
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
39 append(&dummy);
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
40 if(status != 1){
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
41 assert(0);
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
42 }
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
43
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
44 append(dummy());
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
45 if(status != 2){
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
46 assert(0);
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
47 }
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
48
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
49 return 0;
48fc88ca588a [Issue 306] New: dmd 165 breaks existing code
thomask
parents:
diff changeset
50 }