source: tests/enum_tests/enumInlineValue.cfa @ bebfc2e

ast-experimental
Last change on this file since bebfc2e was e874605, checked in by JiadaL <j82liang@…>, 2 years ago

Add class InlineValueDecl?, which is a Declaration class that works as a placeholder for aggregration value inherited from other aggregration. Disable inline value overwrite.

  • Property mode set to 100644
File size: 302 bytes
Line 
1#include <fstream.hfa>
2enum enumA {
3    A=5, B, C=10, D
4};
5
6enum enumB {
7    inline enumA,
8    E
9};
10
11int main() {
12    enum enumB val = A;
13    sout | "enumB.A is" | val;
14    enum enumB val2= enumB.B;
15    sout | "enumB.B is" | val2;
16    sout | "enumB.D is" | enumB.D;
17    sout | "enumB.E is" | enumB.E;
18}
Note: See TracBrowser for help on using the repository browser.