ADTast-experimentalpthread-emulation
Last change
on this file since e5e2334 was
72e76fd,
checked in by Andrew Beach <ajbeach@…>, 2 years ago
|
Converted the last pass in validate B (linkReferenceToTypes). Cleaned up a related test.
|
-
Property mode set to
100644
|
File size:
554 bytes
|
Line | |
---|
1 | #include <stdio.h> |
---|
2 | |
---|
3 | struct Point { |
---|
4 | int x; |
---|
5 | char y; |
---|
6 | }; |
---|
7 | |
---|
8 | enum(Point) PointEnum { |
---|
9 | first={ |
---|
10 | 100, |
---|
11 | 'c' |
---|
12 | }, |
---|
13 | second={ |
---|
14 | 200, |
---|
15 | 'a' |
---|
16 | } |
---|
17 | }; |
---|
18 | |
---|
19 | // The only valid usage |
---|
20 | struct Point apple = first; |
---|
21 | // Failed due to Qualified name is currently unimplemented. |
---|
22 | // struct Point banana = PointEnum.first; |
---|
23 | |
---|
24 | int main() { |
---|
25 | printf("%d %c\n", apple.x, apple.y); |
---|
26 | // Failed; enumInstType is now not a real type and not instantiated. |
---|
27 | // Not sure if we want that |
---|
28 | // printf("%d %c\n", second.x, second.y); |
---|
29 | return 0; |
---|
30 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.