annotate run/odd_bug_02.d @ 5:e6777053bf1c

added odd_bug_02 (digitalmars.D.bugs:1953)
author thomask
date Sun, 26 Sep 2004 21:41:08 +0000
parents
children 33a25c1e1cfc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5
e6777053bf1c added odd_bug_02 (digitalmars.D.bugs:1953)
thomask
parents:
diff changeset
1 // @author@ Ben Hinkle <bhinkle4@juno.com>
e6777053bf1c added odd_bug_02 (digitalmars.D.bugs:1953)
thomask
parents:
diff changeset
2 // @date@ 2004-09-26
e6777053bf1c added odd_bug_02 (digitalmars.D.bugs:1953)
thomask
parents:
diff changeset
3
e6777053bf1c added odd_bug_02 (digitalmars.D.bugs:1953)
thomask
parents:
diff changeset
4 import std.stdarg;
e6777053bf1c added odd_bug_02 (digitalmars.D.bugs:1953)
thomask
parents:
diff changeset
5
e6777053bf1c added odd_bug_02 (digitalmars.D.bugs:1953)
thomask
parents:
diff changeset
6 struct TestStruct{
e6777053bf1c added odd_bug_02 (digitalmars.D.bugs:1953)
thomask
parents:
diff changeset
7 void add(...){
e6777053bf1c added odd_bug_02 (digitalmars.D.bugs:1953)
thomask
parents:
diff changeset
8 TestStruct other = va_arg!(TestStruct)(_argptr);
e6777053bf1c added odd_bug_02 (digitalmars.D.bugs:1953)
thomask
parents:
diff changeset
9 foreach(int value; other){
e6777053bf1c added odd_bug_02 (digitalmars.D.bugs:1953)
thomask
parents:
diff changeset
10 foo();
e6777053bf1c added odd_bug_02 (digitalmars.D.bugs:1953)
thomask
parents:
diff changeset
11 }
e6777053bf1c added odd_bug_02 (digitalmars.D.bugs:1953)
thomask
parents:
diff changeset
12 }
e6777053bf1c added odd_bug_02 (digitalmars.D.bugs:1953)
thomask
parents:
diff changeset
13
e6777053bf1c added odd_bug_02 (digitalmars.D.bugs:1953)
thomask
parents:
diff changeset
14 void foo(){
e6777053bf1c added odd_bug_02 (digitalmars.D.bugs:1953)
thomask
parents:
diff changeset
15 assert(left==null);
e6777053bf1c added odd_bug_02 (digitalmars.D.bugs:1953)
thomask
parents:
diff changeset
16 bar();
e6777053bf1c added odd_bug_02 (digitalmars.D.bugs:1953)
thomask
parents:
diff changeset
17 }
e6777053bf1c added odd_bug_02 (digitalmars.D.bugs:1953)
thomask
parents:
diff changeset
18
e6777053bf1c added odd_bug_02 (digitalmars.D.bugs:1953)
thomask
parents:
diff changeset
19 void bar(){
e6777053bf1c added odd_bug_02 (digitalmars.D.bugs:1953)
thomask
parents:
diff changeset
20 assert(left==null);
e6777053bf1c added odd_bug_02 (digitalmars.D.bugs:1953)
thomask
parents:
diff changeset
21 }
e6777053bf1c added odd_bug_02 (digitalmars.D.bugs:1953)
thomask
parents:
diff changeset
22
e6777053bf1c added odd_bug_02 (digitalmars.D.bugs:1953)
thomask
parents:
diff changeset
23 int opApply(int delegate(inout int val) dg){
e6777053bf1c added odd_bug_02 (digitalmars.D.bugs:1953)
thomask
parents:
diff changeset
24 return 0;
e6777053bf1c added odd_bug_02 (digitalmars.D.bugs:1953)
thomask
parents:
diff changeset
25 }
e6777053bf1c added odd_bug_02 (digitalmars.D.bugs:1953)
thomask
parents:
diff changeset
26
e6777053bf1c added odd_bug_02 (digitalmars.D.bugs:1953)
thomask
parents:
diff changeset
27 void* left;
e6777053bf1c added odd_bug_02 (digitalmars.D.bugs:1953)
thomask
parents:
diff changeset
28 }
e6777053bf1c added odd_bug_02 (digitalmars.D.bugs:1953)
thomask
parents:
diff changeset
29
e6777053bf1c added odd_bug_02 (digitalmars.D.bugs:1953)
thomask
parents:
diff changeset
30 int main(){
e6777053bf1c added odd_bug_02 (digitalmars.D.bugs:1953)
thomask
parents:
diff changeset
31 TestStruct t;
e6777053bf1c added odd_bug_02 (digitalmars.D.bugs:1953)
thomask
parents:
diff changeset
32 t.foo();
e6777053bf1c added odd_bug_02 (digitalmars.D.bugs:1953)
thomask
parents:
diff changeset
33 return 0;
e6777053bf1c added odd_bug_02 (digitalmars.D.bugs:1953)
thomask
parents:
diff changeset
34 }
e6777053bf1c added odd_bug_02 (digitalmars.D.bugs:1953)
thomask
parents:
diff changeset
35