Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/Scope.c

    r62edde5 r10dc7491  
    33typedef float t;
    44y z;
    5 type u = struct { int a; double b; };
     5//otype u = struct { int a; double b; };
     6typedef struct { int a; double b; } u;
    67int f( int y );
    78y q;
     9struct x { int x; };
    810
    911y 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 );
    1116        u u = y;
    12         x z = t(u);
     17        struct x z = t(u);
    1318}
    1419
    1520y p;
    1621
    17 context has_u( type z ) {
     22trait has_u( otype z ) {
    1823        z u(z);
    1924};
    2025
    21 forall( type t | has_u( t ) )
     26forall( otype t | has_u( t ) )
    2227y q( t the_t ) {
    2328        t y = u( the_t );
     
    4045}
    4146
     47void some_func() {}
     48
    4249t g( void ) {
    4350        typedef char x;
    44         try {
     51//      try {
    4552                some_func();
    46         } catch ( x x ) {
    47                 t y = x;
    48         }
     53//      } catch ( x x ) {
     54//              t y = x;
     55//      }
    4956        x z;
    5057}
Note: See TracChangeset for help on using the changeset viewer.