Last change
on this file was
fd54fef,
checked in by Michael Brooks <mlbrooks@…>, 4 years 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 | |
---|
1 | forall(T) |
---|
2 | struct wrapper |
---|
3 | { |
---|
4 | T value; |
---|
5 | }; |
---|
6 | |
---|
7 | forall(T) |
---|
8 | wrapper(T) create() |
---|
9 | { |
---|
10 | wrapper(T) test; |
---|
11 | return test; |
---|
12 | } |
---|
13 | |
---|
14 | forall(T) |
---|
15 | wrapper(T)* ?=?(wrapper(T)* lhs, wrapper(T)* rhs) |
---|
16 | { |
---|
17 | lhs->value = rhs->value; |
---|
18 | return lhs; |
---|
19 | } |
---|
20 | |
---|
21 | |
---|
22 | int 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.