Menu

#5 config() doesn't work with enums

open-accepted
nobody
5
2010-09-16
2010-09-16
No

config() doesn't work when the configuration variable is of enumeration type. Somehow it thinks that the variable is of integer type.

E.g., code like the following doesn't work as expected:

enum MyEnum { | A | B | C }
// ...
public Main() : void {
config a = MyEnum.A; // compiler thinks that a is integer
// ...
}

Discussion

  • Andrew V. Adinetz

    • status: open --> open-accepted
     
  • Andrew V. Adinetz

    Looks like it's because resulting type is inserted as PExpr, not as type variable

     
MongoDB Logo MongoDB