blob: 42f6d00f6dc2ea4092b64b938a61d4f21695a3e9 [file] [log] [blame]
library;
import self as self;
import "dart:core" as core;
import "dart:_internal" as _in;
class A extends core::_Enum /*isEnum*/ {
static const field core::List<self::A> values = #C13;
final field self::B value;
enum-element static const field self::A a = #C5;
enum-element static const field self::A b = #C11;
const constructor •(core::int #index, core::String #name, self::B value) → self::A
: self::A::value = value, super core::_Enum::•(#index, #name)
;
method _enumToString() core::String
return "A.${this.{core::_Enum::_name}{core::String}}";
static method _#new#tearOff(core::int #index, core::String #name, self::B value) → self::A
return new self::A::•(#index, #name, value);
}
class B extends core::Object /*hasConstConstructor*/ {
final field core::int value;
static const field self::B a = #C3;
static const field self::B b = #C9;
const constructor •(core::int value) self::B
: self::B::value = value, super core::Object::•()
;
static method _#new#tearOff(core::int value) → self::B
return new self::B::•(value);
}
static method method(self::A a) core::String {
#L1:
switch(a) /* isExplicitlyExhaustive, self::A */ {
#L2:
case #C5:
{
return "a";
}
#L3:
case #C11:
{
return "b";
}
#L4:
default:
throw{for-error-handling} new _in::ReachabilityError::•("`null` encountered as case in a switch statement with a non-nullable type.");
}
}
constants {
#C1 = "a"
#C2 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ const core::int::fromEnvironment(#C1)
#C3 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ self::B{value:#C2}
#C4 = 0.0
#C5 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ self::A{value:#C3, index:#C4, _name:#C1}
#C6 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ const <dynamic>[#C5]
#C7 = "b"
#C8 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ const core::int::fromEnvironment(#C7)
#C9 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ self::B{value:#C8}
#C10 = 1.0
#C11 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ self::A{value:#C9, index:#C10, _name:#C7}
#C12 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ const <dynamic>[#C11]
#C13 = eval /* from org-dartlang-testcase:///enum_from_environment.dart */ #C6 + #C12
}
Extra constant evaluation status:
Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///enum_from_environment.dart:5:6 -> ListConstant(const <A*>[const A{A.value: const B{B.value: 0.0}, _Enum.index: 0.0, _Enum._name: "a"}, const A{A.value: const B{B.value: 0.0}, _Enum.index: 1.0, _Enum._name: "b"}])
Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///enum_from_environment.dart:6:3 -> InstanceConstant(const A{A.value: const B{B.value: 0.0}, _Enum.index: 0.0, _Enum._name: "a"})
Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///enum_from_environment.dart:7:3 -> InstanceConstant(const A{A.value: const B{B.value: 0.0}, _Enum.index: 1.0, _Enum._name: "b"})
Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///enum_from_environment.dart:20:28 -> InstanceConstant(const B{B.value: 0.0})
Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///enum_from_environment.dart:21:28 -> InstanceConstant(const B{B.value: 0.0})
Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///enum_from_environment.dart:26:12 -> InstanceConstant(const A{A.value: const B{B.value: 0.0}, _Enum.index: 0.0, _Enum._name: "a"})
Evaluated with empty environment: ConstantExpression @ org-dartlang-testcase:///enum_from_environment.dart:28:12 -> InstanceConstant(const A{A.value: const B{B.value: 0.0}, _Enum.index: 1.0, _Enum._name: "b"})
Extra constant evaluation: evaluated: 23, effectively constant: 7
Constructor coverage from constants:
org-dartlang-testcase:///enum_from_environment.dart:
- B. (from org-dartlang-testcase:///enum_from_environment.dart:18:9)
- Object. (from org-dartlang-sdk:///lib/core/object.dart)
- A. (from org-dartlang-testcase:///enum_from_environment.dart:12:9)
- _Enum. (from org-dartlang-sdk:///lib/core/enum.dart)