Changes in tests/enum_tests/structEnum.cfa [12df6fe:72e76fd]
- File:
-
- 1 edited
-
tests/enum_tests/structEnum.cfa (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tests/enum_tests/structEnum.cfa
r12df6fe r72e76fd 2 2 3 3 struct Point { 4 int x;5 char y;4 int x; 5 char y; 6 6 }; 7 7 8 8 enum(Point) PointEnum { 9 first={10 100,11 'c'12 },13 second={14 200,15 'a'16 }9 first={ 10 100, 11 'c' 12 }, 13 second={ 14 200, 15 'a' 16 } 17 17 }; 18 19 PointEnum foo(PointEnum in) {20 return in;21 }22 18 23 19 // The only valid usage 24 20 struct Point apple = first; 25 21 // Failed due to Qualified name is currently unimplemented. 22 // struct Point banana = PointEnum.first; 26 23 27 24 int main() { 28 PointEnum vals = second; 29 PointEnum val2; 30 // The failing line: assignment 31 // val2 = vals; 32 33 printf("%d %c\n", apple.x, apple.y); 34 // Failed; enumInstType is now not a real type and not instantiated. 35 // Not sure if we want that 36 // printf("%d %c\n", second.x, second.y); 37 return 0; 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; 38 30 }
Note:
See TracChangeset
for help on using the changeset viewer.