Changes in src/tests/Scope.c [62edde5:10dc7491]
- File:
-
- 1 edited
-
src/tests/Scope.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/tests/Scope.c
r62edde5 r10dc7491 3 3 typedef float t; 4 4 y z; 5 type u = struct { int a; double b; }; 5 //otype u = struct { int a; double b; }; 6 typedef struct { int a; double b; } u; 6 7 int f( int y ); 7 8 y q; 9 struct x { int x; }; 8 10 9 11 y w( y y, u v ) { 10 type x | { x t(u); }; 12 // otype x | { x t(u); }; 13 void ?{}(struct x *); 14 void ^?{}(struct x *); 15 extern struct x t( u ); 11 16 u u = y; 12 x z = t(u);17 struct x z = t(u); 13 18 } 14 19 15 20 y p; 16 21 17 context has_u(type z ) {22 trait has_u( otype z ) { 18 23 z u(z); 19 24 }; 20 25 21 forall( type t | has_u( t ) )26 forall( otype t | has_u( t ) ) 22 27 y q( t the_t ) { 23 28 t y = u( the_t ); … … 40 45 } 41 46 47 void some_func() {} 48 42 49 t g( void ) { 43 50 typedef char x; 44 try {51 // try { 45 52 some_func(); 46 } catch ( x x ) {47 t y = x;48 }53 // } catch ( x x ) { 54 // t y = x; 55 // } 49 56 x z; 50 57 }
Note:
See TracChangeset
for help on using the changeset viewer.