Changeset 90152a4 for tests/tuple/tupleVariadic.c
- Timestamp:
- Aug 27, 2018, 4:40:34 PM (7 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- b7c89aa
- Parents:
- f9feab8 (diff), 305581d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 moved
-
tests/tuple/tupleVariadic.c (moved) (moved from src/tests/tupleVariadic.c ) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tests/tuple/tupleVariadic.c
rf9feab8 r90152a4 9 9 // Author : Rob Schluntz 10 10 // Created On : Fri Dec 16 10:25:35 2016 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Fri Dec 21 14:42:48 201613 // Update Count : 211 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Aug 2 09:24:04 2018 13 // Update Count : 6 14 14 // 15 16 #include <stdlib.hfa> 15 17 16 18 void func(void) { … … 28 30 printf("called process(double) %g\n", x); 29 31 } 30 31 forall( dtype T, ttype Params | sized(T) | { void ?{}(T &, Params); } )32 T * new(Params p);33 32 34 33 struct array { … … 68 67 } 69 68 69 void ^?{}(array & a) { 70 free(a.data); 71 } 72 70 73 // test use of a tuple argument 71 74 [void] ?{}(array & a, [int, int, int, int] args) { … … 95 98 } 96 99 100 forall(ttype T | { void foo(T); }) void bar(T x) {} 101 void foo(int) {} 102 97 103 int main() { 98 104 array * x0 = new(); … … 117 123 func(3, 2.0, 111, 4.145); 118 124 printf("finished func\n"); 125 126 { 127 // T = [const int] -- this ensures that void(*)(int) satisfies void(*)(const int) 128 const int x; 129 bar(x); 130 } 131 132 delete(ptr); 133 delete(x4); 134 delete(x3); 135 delete(x2); 136 delete(x1); 137 delete(x0); 119 138 } 120 139 … … 122 141 // tab-width: 4 // 123 142 // End: // 124
Note:
See TracChangeset
for help on using the changeset viewer.