Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/Scope.c

    r10dc7491 r62edde5  
    33typedef float t;
    44y z;
    5 //otype u = struct { int a; double b; };
    6 typedef struct { int a; double b; } u;
     5type u = struct { int a; double b; };
    76int f( int y );
    87y q;
    9 struct x { int x; };
    108
    119y w( y y, u v ) {
    12 //      otype x | { x t(u); };
    13         void ?{}(struct x *);
    14         void ^?{}(struct x *);
    15         extern struct x t( u );
     10        type x | { x t(u); };
    1611        u u = y;
    17         struct x z = t(u);
     12        x z = t(u);
    1813}
    1914
    2015y p;
    2116
    22 trait has_u( otype z ) {
     17context has_u( type z ) {
    2318        z u(z);
    2419};
    2520
    26 forall( otype t | has_u( t ) )
     21forall( type t | has_u( t ) )
    2722y q( t the_t ) {
    2823        t y = u( the_t );
     
    4540}
    4641
    47 void some_func() {}
    48 
    4942t g( void ) {
    5043        typedef char x;
    51 //      try {
     44        try {
    5245                some_func();
    53 //      } catch ( x x ) {
    54 //              t y = x;
    55 //      }
     46        } catch ( x x ) {
     47                t y = x;
     48        }
    5649        x z;
    5750}
Note: See TracChangeset for help on using the changeset viewer.