source: src/Tests/SynTree/Scope.c @ cd623a4

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decaygc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newstringwith_gc
Last change on this file since cd623a4 was a65d92e, checked in by Peter A. Buhr <pabuhr@…>, 9 years ago

regression testing, second attempt

  • Property mode set to 100644
File size: 674 bytes
RevLine 
[51b7345]1int x;
2typedef double y;
3typedef float t;
4y z;
5type u = struct { int a; double b; };
6int f( int y );
7y q;
8
9y w(y y, u v) {
[a65d92e]10        type x | { x t(u); };
11        u u = y;
12        x z = t(u);
[51b7345]13}
14
15y p;
16
17context has_u( type z )
18{
[a65d92e]19        z u(z);
[51b7345]20};
21
22forall( type t | has_u( t ) )
23y q( t the_t )
24{
[a65d92e]25        t y = u( the_t );
[51b7345]26}
27
28t f( y p ) {
[a65d92e]29        int y;
30        typedef char x;
[51b7345]31
[a65d92e]32        {
33                x y;
34                typedef x z;
[51b7345]35
[a65d92e]36                {
37                        z x;
38                        typedef z y;
39                        y z = x;
40                }
[51b7345]41
[a65d92e]42                z x = y;
43        }
[51b7345]44
[a65d92e]45        x q = y;
[51b7345]46}
47
48t g( void ) {
[a65d92e]49        typedef char x;
50        try {
51                some_func();
52        } catch ( x x ) {
53                t y = x;
54        }
55        x z;
[51b7345]56}
57
[a65d92e]58y q( i )
[51b7345]59    int i;
60{
[a65d92e]61        switch ( i ) {
62                y q = i;
63          case 0:
64                return q;
65          default:
66                return i;
67        }
[51b7345]68}
69
[a65d92e]70// Local Variables: //
71// tab-width: 4 //
72// End: //
Note: See TracBrowser for help on using the repository browser.