Ignore:
Timestamp:
Apr 28, 2024, 7:50:11 PM (2 months ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
c5c123f
Parents:
7042c60
Message:
  1. Change return value of typed Enum in null context: they now return the position. Therefore, printf with enumeration value will no longer be supported. 2. sout now will return the enumeration value. So sout | enumValue will print what we expect. 3. Provide enum.hfa, which contains traits that related to enum. 4. Implement functions declare in enum.hfa for enum types, so enum type fulfill the traits. Known defeat: error if we use the enum traits on enum types. They work but c compiler gives an warning
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/enum_tests/enumInlineValue.cfa

    r7042c60 reb7586e  
    1212    enum enumB val = A;
    1313    sout | "enumB.A is" | val;
    14     enum enumB val2= enumB.B;
     14    enum enumB val2 = enumB.B;
    1515    sout | "enumB.B is" | val2;
    1616    sout | "enumB.D is" | enumB.D;
Note: See TracChangeset for help on using the changeset viewer.