library test;
import self as self;
import "dart:core" as core;

class E extends core::Object /*isEnum*/  {
  final field core::int* index;
  final field core::String* _name;
  static const field core::List<self::E*>* values = const <self::E*>[self::E::v1];
  static const field self::E* v1 = const self::E::•(0, "E.v1");
  const constructor •(core::int* index, core::String* _name) → self::E*
    : self::E::index = index, self::E::_name = _name, super core::Object::•()
    ;
  method toString() → core::String*
    return this.{self::E::_name};
  abstract member-signature get /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/object_patch.dart */ _identityHashCode() → core::int*; -> core::Object::_identityHashCode
  abstract member-signature method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/object_patch.dart */ _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf
  abstract member-signature method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/object_patch.dart */ _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf
  abstract member-signature method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/object_patch.dart */ _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue
  abstract member-signature method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/object_patch.dart */ _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse
  abstract member-signature operator /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/object_patch.dart */ ==(dynamic other) → core::bool*; -> core::Object::==
  abstract member-signature get /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/object_patch.dart */ hashCode() → core::int*; -> core::Object::hashCode
  abstract member-signature method /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/object_patch.dart */ noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
  abstract member-signature get /* from org-dartlang-sdk:///sdk/lib/_internal/vm/lib/object_patch.dart */ runtimeType() → core::Type*; -> core::Object::runtimeType
}
static final field core::List<self::E*>* x;
static method main() → dynamic
  ;


Extra constant evaluation status:
Evaluated: ListLiteral @ org-dartlang-testcase:///inferred_type_is_enum_values.dart:8:6 -> ListConstant(const <E*>[const E{E.index: 0, E._name: "E.v1"}])
Evaluated: ConstructorInvocation @ org-dartlang-testcase:///inferred_type_is_enum_values.dart:8:10 -> InstanceConstant(const E{E.index: 0, E._name: "E.v1"})
Extra constant evaluation: evaluated: 6, effectively constant: 2
