Changeset fd54fef for tests/polymorphism.cfa
 Timestamp:
 Jan 19, 2021, 8:44:29 PM (3 years ago)
 Branches:
 ADT, armeh, astexperimental, enum, forallpointerdecay, jacob/cs343translation, master, newastuniqueexpr, pthreademulation, qualifiedEnum
 Children:
 dafbde8
 Parents:
 2f47ea4
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

tests/polymorphism.cfa
r2f47ea4 rfd54fef 18 18 #include <fstream.hfa> 19 19 20 forall( otypeT)20 forall(T) 21 21 T f(T x, T y) { 22 22 x = y; … … 24 24 } 25 25 26 forall( otypeT) T ident(T x) {26 forall(T) T ident(T x) { 27 27 return x; 28 28 } 29 29 30 forall( otype T, otypeU )30 forall( T, U ) 31 31 size_t struct_size( T i, U j ) { 32 32 struct S { T i; U j; }; … … 34 34 } 35 35 36 forall( otype T, otypeU )36 forall( T, U ) 37 37 size_t union_size( T i, U j ) { 38 38 union B { T i; U j; }; … … 41 41 42 42 // perform some simple operations on aggregates of T and U 43 forall( otype T  { void print(T); int ?==?(T, T); }, otypeU  { void print(U); U ?=?(U&, zero_t); } )43 forall( T  { void print(T); int ?==?(T, T); }, U  { void print(U); U ?=?(U&, zero_t); } ) 44 44 U foo(T i, U j) { 45 45 struct S { T i; U j; };
Note: See TracChangeset
for help on using the changeset viewer.