source: tests/zombies/gc_no_raii/bug-repro/return.c @ fd54fef

arm-ehjacob/cs343-translationnew-ast-unique-expr
Last change on this file since fd54fef was fd54fef, checked in by Michael Brooks <mlbrooks@…>, 9 months ago

Converting the project to use the new syntax for otype, dtype and ttytpe.

Changed prelude (gen), libcfa and test suite to use it. Added a simple deprecation rule of the old syntax to the parser; we might wish to support both syntaxes "officially," like with an extra CLI switch, but this measure should serve as a simple reminder for our team to try the new syntax.

  • Property mode set to 100644
File size: 305 bytes
Line 
1forall(T)
2struct wrapper
3{
4        T value;
5};
6
7forall(T)
8wrapper(T) create()
9{
10        wrapper(T) test;
11        return test;
12}
13
14forall(T)
15wrapper(T)* ?=?(wrapper(T)* lhs, wrapper(T)* rhs)
16{
17        lhs->value = rhs->value;
18        return lhs;
19}
20
21
22int main(int argc, char const *argv[])
23{
24        wrapper(int) test;
25        test = create();
26        return 0;
27}
Note: See TracBrowser for help on using the repository browser.