| library /*isNonNullableByDefault*/; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/general/issue49697_2/main.dart:17:11: Error: The type 'A?' is not exhaustively matched by the switch cases. |
| // - 'A' is from 'pkg/front_end/testcases/general/issue49697_2/main.dart'. |
| // Try adding a default case or cases that match A.b. |
| // switch (a) { |
| // ^ |
| // |
| // pkg/front_end/testcases/general/issue49697_2/main.dart:24:11: Error: The type 'A?' is not exhaustively matched by the switch cases. |
| // - 'A' is from 'pkg/front_end/testcases/general/issue49697_2/main.dart'. |
| // Try adding a default case or cases that match A.b. |
| // switch (a) { |
| // ^ |
| // |
| // pkg/front_end/testcases/general/issue49697_2/main.dart:42:11: Error: The type 'B?' is not exhaustively matched by the switch cases. |
| // - 'B' is from 'pkg/front_end/testcases/general/issue49697_2/main.dart'. |
| // Try adding a default case or cases that match B.b. |
| // switch (b) { |
| // ^ |
| // |
| // pkg/front_end/testcases/general/issue49697_2/main.dart:51:11: Error: The type 'C?' is not exhaustively matched by the switch cases. |
| // - 'C' is from 'pkg/front_end/testcases/general/issue49697_2/main_lib.dart'. |
| // Try adding a default case or cases that match C.b. |
| // switch (c) { |
| // ^ |
| // |
| // pkg/front_end/testcases/general/issue49697_2/main.dart:58:11: Error: The type 'C?' is not exhaustively matched by the switch cases. |
| // - 'C' is from 'pkg/front_end/testcases/general/issue49697_2/main_lib.dart'. |
| // Try adding a default case or cases that match C.b. |
| // switch (c) { |
| // ^ |
| // |
| // pkg/front_end/testcases/general/issue49697_2/main.dart:76:11: Error: The type 'D?' is not exhaustively matched by the switch cases. |
| // - 'D' is from 'pkg/front_end/testcases/general/issue49697_2/main_lib.dart'. |
| // Try adding a default case or cases that match D.b. |
| // switch (d) { |
| // ^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| import "main_lib.dart" as mai; |
| |
| import "org-dartlang-testcase:///main_lib.dart"; |
| |
| class A extends core::_Enum /*isEnum*/ { |
| static const field core::List<self::A> values = #C7; |
| enum-element static const field self::A a = #C3; |
| enum-element static const field self::A b = #C6; |
| const constructor •(core::int #index, core::String #name) → self::A |
| : super core::_Enum::•(#index, #name) |
| ; |
| method _enumToString() → core::String |
| return "A.${this.{core::_Enum::_name}{core::String}}"; |
| } |
| class B extends core::_Enum /*isEnum*/ { |
| static const field core::List<self::B> values = #C10; |
| static const field self::B c = #C8; |
| enum-element static const field self::B a = #C8; |
| enum-element static const field self::B b = #C9; |
| const constructor •(core::int #index, core::String #name) → self::B |
| : super core::_Enum::•(#index, #name) |
| ; |
| method _enumToString() → core::String |
| return "B.${this.{core::_Enum::_name}{core::String}}"; |
| } |
| static method a1(self::A? a) → core::int? { |
| #L1: |
| { |
| final synthesized self::A? #0#0 = a; |
| if(#C3 =={core::Object::==}{(core::Object) → core::bool} #0#0) { |
| { |
| return 0; |
| } |
| } |
| } |
| } |
| static method a2(self::A? a) → core::int? { |
| #L2: |
| { |
| final synthesized self::A? #0#0 = a; |
| if(#0#0 == null) { |
| { |
| return null; |
| } |
| } |
| else |
| if(#C3 =={core::Object::==}{(core::Object) → core::bool} #0#0) { |
| { |
| return 0; |
| } |
| } |
| } |
| } |
| static method b1(self::B b) → core::int { |
| #L3: |
| { |
| final synthesized self::B #0#0 = b; |
| if(#C8 =={core::Object::==}{(core::Object) → core::bool} #0#0) { |
| { |
| return 0; |
| } |
| } |
| else |
| if(#C9 =={core::Object::==}{(core::Object) → core::bool} #0#0) { |
| { |
| return 1; |
| } |
| } |
| } |
| } |
| static method b2(self::B? b) → core::int? { |
| #L4: |
| { |
| final synthesized self::B? #0#0 = b; |
| if(#0#0 == null) { |
| { |
| return null; |
| } |
| } |
| else |
| if(#C8 =={core::Object::==}{(core::Object) → core::bool} #0#0) { |
| { |
| return 0; |
| } |
| } |
| } |
| } |
| static method c1(mai::C? c) → core::int? { |
| #L5: |
| { |
| final synthesized mai::C? #0#0 = c; |
| if(#C11 =={core::Object::==}{(core::Object) → core::bool} #0#0) { |
| { |
| return 0; |
| } |
| } |
| } |
| } |
| static method c2(mai::C? c) → core::int? { |
| #L6: |
| { |
| final synthesized mai::C? #0#0 = c; |
| if(#0#0 == null) { |
| { |
| return null; |
| } |
| } |
| else |
| if(#C11 =={core::Object::==}{(core::Object) → core::bool} #0#0) { |
| { |
| return 0; |
| } |
| } |
| } |
| } |
| static method d1(mai::D d) → core::int { |
| #L7: |
| { |
| final synthesized mai::D #0#0 = d; |
| if(#C12 =={core::Object::==}{(core::Object) → core::bool} #0#0) { |
| { |
| return 0; |
| } |
| } |
| else |
| if(#C13 =={core::Object::==}{(core::Object) → core::bool} #0#0) { |
| { |
| return 1; |
| } |
| } |
| } |
| } |
| static method d2(mai::D? d) → core::int? { |
| #L8: |
| { |
| final synthesized mai::D? #0#0 = d; |
| if(#0#0 == null) { |
| { |
| return null; |
| } |
| } |
| else |
| if(#C12 =={core::Object::==}{(core::Object) → core::bool} #0#0) { |
| { |
| return 0; |
| } |
| } |
| } |
| } |
| static method main() → void { |
| self::a1(#C6); |
| self::a2(#C6); |
| self::b1(#C9); |
| self::b2(#C9); |
| self::c1(#C14); |
| self::c2(#C14); |
| self::d1(#C13); |
| self::d2(#C13); |
| } |
| |
| library /*isNonNullableByDefault*/; |
| import self as mai; |
| import "dart:core" as core; |
| |
| class C extends core::_Enum /*isEnum*/ { |
| static const field core::List<mai::C> values = #C15; |
| enum-element static const field mai::C a = #C11; |
| enum-element static const field mai::C b = #C14; |
| const constructor •(core::int #index, core::String #name) → mai::C |
| : super core::_Enum::•(#index, #name) |
| ; |
| method _enumToString() → core::String |
| return "C.${this.{core::_Enum::_name}{core::String}}"; |
| } |
| class D extends core::_Enum /*isEnum*/ { |
| static const field core::List<mai::D> values = #C16; |
| static const field mai::D c = #C12; |
| enum-element static const field mai::D a = #C12; |
| enum-element static const field mai::D b = #C13; |
| const constructor •(core::int #index, core::String #name) → mai::D |
| : super core::_Enum::•(#index, #name) |
| ; |
| method _enumToString() → core::String |
| return "D.${this.{core::_Enum::_name}{core::String}}"; |
| } |
| |
| constants { |
| #C1 = 0 |
| #C2 = "a" |
| #C3 = self::A {index:#C1, _name:#C2} |
| #C4 = 1 |
| #C5 = "b" |
| #C6 = self::A {index:#C4, _name:#C5} |
| #C7 = <self::A>[#C3, #C6] |
| #C8 = self::B {index:#C1, _name:#C2} |
| #C9 = self::B {index:#C4, _name:#C5} |
| #C10 = <self::B>[#C8, #C9] |
| #C11 = mai::C {index:#C1, _name:#C2} |
| #C12 = mai::D {index:#C1, _name:#C2} |
| #C13 = mai::D {index:#C4, _name:#C5} |
| #C14 = mai::C {index:#C4, _name:#C5} |
| #C15 = <mai::C>[#C11, #C14] |
| #C16 = <mai::D>[#C12, #C13] |
| } |
| |
| |
| Constructor coverage from constants: |
| org-dartlang-testcase:///main_lib.dart: |
| - C. (from org-dartlang-testcase:///main_lib.dart:5:6) |
| - _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart) |
| - Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart) |
| - D. (from org-dartlang-testcase:///main_lib.dart:7:6) |
| |
| org-dartlang-testcase:///main.dart: |
| - A. (from org-dartlang-testcase:///main.dart:7:6) |
| - _Enum. (from org-dartlang-sdk:///sdk/lib/core/enum.dart) |
| - Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart) |
| - B. (from org-dartlang-testcase:///main.dart:9:6) |