54b588a373
Closes #53615 TEST=existing Change-Id: Ic2ad21787e62c8051dc2020cc15d61195f512b80 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330440 Reviewed-by: Ben Konyi <bkonyi@google.com> Commit-Queue: Johnni Winther <johnniwinther@google.com>
74 lines
3.1 KiB
Plaintext
74 lines
3.1 KiB
Plaintext
library;
|
|
import self as self;
|
|
import "dart:core" as core;
|
|
|
|
class E extends core::_Enum /*isEnum*/ {
|
|
static const field core::List<self::E> values = const <self::E>[self::E::a, self::E::b, self::E::c];
|
|
enum-element static const field self::E a = const self::E::•(0, "a");
|
|
enum-element static const field self::E b = const self::E::•(1, "b");
|
|
enum-element static const field self::E c = const self::E::•(2, "c");
|
|
const synthetic constructor •(core::int #index, core::String #name) → self::E
|
|
: super core::_Enum::•(#index, #name)
|
|
;
|
|
method _enumToString() → core::String
|
|
return "E.${this.{core::_Enum::_name}{core::String}}";
|
|
}
|
|
class PrimitiveEquals extends core::Object /*hasConstConstructor*/ {
|
|
final field core::int field;
|
|
const constructor •(core::int field) → self::PrimitiveEquals
|
|
: self::PrimitiveEquals::field = field, super core::Object::•()
|
|
;
|
|
}
|
|
class NonPrimitiveEquals extends core::Object /*hasConstConstructor*/ {
|
|
final field core::int field;
|
|
const constructor •(core::int field) → self::NonPrimitiveEquals
|
|
: self::NonPrimitiveEquals::field = field, super core::Object::•()
|
|
;
|
|
get hashCode() → core::int
|
|
;
|
|
operator ==(core::Object other) → core::bool
|
|
;
|
|
}
|
|
static method switchStatement(dynamic o) → dynamic
|
|
;
|
|
static method switchStatementWithLabel(dynamic o) → dynamic
|
|
;
|
|
static method switchStatementWithContinue(dynamic o) → dynamic
|
|
;
|
|
static method switchStatementWithContinueNested(dynamic o1, dynamic o2) → dynamic
|
|
;
|
|
static method switchStatementEnum(self::E o) → dynamic
|
|
;
|
|
static method switchStatementEnumWithGuard(self::E o) → dynamic
|
|
;
|
|
static method switchStatementEnumWithLabel(self::E o) → dynamic
|
|
;
|
|
static method switchStatementEnumWithContinue(self::E o) → dynamic
|
|
;
|
|
static method switchStatementPrimitiveEquals(dynamic o) → dynamic
|
|
;
|
|
static method switchStatementNonPrimitiveEquals(dynamic o) → dynamic
|
|
;
|
|
static method switchExpression(dynamic o) → dynamic
|
|
;
|
|
static method switchExpressionEnum(self::E o) → dynamic
|
|
;
|
|
static method switchExpressionEnumWithGuard(self::E o) → dynamic
|
|
;
|
|
static method switchExpressionPrimitiveEquals(dynamic o) → dynamic
|
|
;
|
|
static method switchExpressionNonPrimitiveEquals(dynamic o) → dynamic
|
|
;
|
|
static method switchStatementSymbol(core::Symbol s) → dynamic
|
|
;
|
|
static method switchExpressionSymbol(core::Symbol s) → dynamic
|
|
;
|
|
|
|
|
|
Extra constant evaluation status:
|
|
Evaluated: ListLiteral @ org-dartlang-testcase:///switch_encoding.dart:5:6 -> ListConstant(const <E*>[const E{_Enum.index: 0, _Enum._name: "a"}, const E{_Enum.index: 1, _Enum._name: "b"}, const E{_Enum.index: 2, _Enum._name: "c"}])
|
|
Evaluated: ConstructorInvocation @ org-dartlang-testcase:///switch_encoding.dart:5:10 -> InstanceConstant(const E{_Enum.index: 0, _Enum._name: "a"})
|
|
Evaluated: ConstructorInvocation @ org-dartlang-testcase:///switch_encoding.dart:5:13 -> InstanceConstant(const E{_Enum.index: 1, _Enum._name: "b"})
|
|
Evaluated: ConstructorInvocation @ org-dartlang-testcase:///switch_encoding.dart:5:16 -> InstanceConstant(const E{_Enum.index: 2, _Enum._name: "c"})
|
|
Extra constant evaluation: evaluated: 11, effectively constant: 4
|