Unknown identifier: ValueType

I’m rather confused… the compiler when I build doesn’t know what the type “ValueType” is… well, it’s an Enum in the base directory of the Haxe source, but for some reason it can’t find it.

Here is the subject code:

public static function getTypeName(obj:Dynamic):String
    {
        if (Type.typeof(obj) == ValueType.TEnum)
            return Type.getEnumName(Type.getEnum(obj));
        else if (Type.typeof(obj) == ValueType.TClass)
            return Type.getClassName(Type.getClass(obj));
        else
            return "";
    }

Any thoughts?

switch(Type.typeof(obj)) {
    case TEnum(e):
        return Type.getEnumName(e);
    case TClass(c):
        return Type.getClassName(c);
    default:
        return "";
}