- Timestamp:
- Jan 5, 2017, 10:51:50 AM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 6c3a988f
- Parents:
- 4c8621ac
- Location:
- src/tests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tests/.expect/tupleVariadic.txt
r4c8621ac r1e3d5b6 9 9 called ?{} with a: 10 2 3 4 10 10 array = { 10, 2, 3, 4, } 11 calling func 12 called process(int) 3 13 called process(double) 2 14 called process(int) 111 15 called process(double) 4.145 16 called func(void) 17 finished func -
src/tests/tupleVariadic.c
r4c8621ac r1e3d5b6 13 13 // Update Count : 2 14 14 // 15 16 void func(void) { 17 printf("called func(void)\n"); 18 } 19 forall(otype T, ttype Params | { void process(T); void func(Params); }) 20 void func(T arg1, Params p) { 21 process(arg1); 22 func(p); 23 } 24 void process(int x) { 25 printf("called process(int) %d\n", x); 26 } 27 void process(double x) { 28 printf("called process(double) %g\n", x); 29 } 15 30 16 31 forall(otype T) T * malloc(); … … 93 108 array * x4 = new(10, 2, 3, 4); 94 109 print(x4); 110 printf("calling func\n"); 111 func(3, 2.0, 111, 4.145); 112 printf("finished func\n"); 95 113 } 96 114
Note: See TracChangeset
for help on using the changeset viewer.