Changeset dafbde8 for tests/zombies/typeGenerator.cfa
- Timestamp:
- Jan 20, 2021, 4:49:40 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 454f478
- Parents:
- 92bfda0 (diff), fd54fef (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 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/zombies/typeGenerator.cfa
r92bfda0 rdafbde8 1 context addable( otypeT ) {1 context addable( T ) { 2 2 T ?+?( T,T ); 3 3 T ?=?( T*, T); 4 4 }; 5 5 6 otype List1( otypeT | addable( T ) ) = struct { T data; List1( T ) *next; } *;6 otype List1( T | addable( T ) ) = struct { T data; List1( T ) *next; } *; 7 7 typedef List1( int ) ListOfIntegers; 8 8 //List1( int ) li; … … 11 11 [int] h( * List1( int ) p ); // new declaration syntax 12 12 13 struct( otypeT ) S2 { T i; }; // actual definition13 struct( T ) S2 { T i; }; // actual definition 14 14 struct( int ) S3 v1, *p; // expansion and instantiation 15 struct( otypeT )( int ) S24 { T i; } v2; // actual definition, expansion and instantiation16 struct( otypeT )( int ) { T i; } v2; // anonymous actual definition, expansion and instantiation15 struct( T )( int ) S24 { T i; } v2; // actual definition, expansion and instantiation 16 struct( T )( int ) { T i; } v2; // anonymous actual definition, expansion and instantiation 17 17 18 struct( otypeT | addable( T ) ) node { T data; struct( T ) node *next; };19 otype List( otypeT ) = struct( T ) node *;18 struct( T | addable( T ) ) node { T data; struct( T ) node *next; }; 19 otype List( T ) = struct( T ) node *; 20 20 List( int ) my_list; 21 21
Note:
See TracChangeset
for help on using the changeset viewer.