| library; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/patterns/exhaustiveness/intersect.dart:28:11: Error: The type 'T' is not exhaustively matched by the switch cases since it doesn't match 'false'. |
| // Try adding a default case or cases that match 'false'. |
| // switch (x1) /* Error */ { |
| // ^ |
| // |
| // pkg/front_end/testcases/patterns/exhaustiveness/intersect.dart:32:18: Error: The type 'T' is not exhaustively matched by the switch cases since it doesn't match 'false'. |
| // Try adding a wildcard pattern or cases that match 'false'. |
| // return switch (x2) /* Error */ { |
| // ^ |
| // |
| // pkg/front_end/testcases/patterns/exhaustiveness/intersect.dart:49:11: Error: The type 'T' is not exhaustively matched by the switch cases since it doesn't match 'true'. |
| // Try adding a default case or cases that match 'true'. |
| // switch (x1) /* Error */ { |
| // ^ |
| // |
| // pkg/front_end/testcases/patterns/exhaustiveness/intersect.dart:53:18: Error: The type 'T' is not exhaustively matched by the switch cases since it doesn't match 'true'. |
| // Try adding a wildcard pattern or cases that match 'true'. |
| // return switch (x2) /* Error */ { |
| // ^ |
| // |
| // pkg/front_end/testcases/patterns/exhaustiveness/intersect.dart:90:13: Error: The type 'T' is not exhaustively matched by the switch cases since it doesn't match 'false'. |
| // Try adding a default case or cases that match 'false'. |
| // switch (x1) /* Error */ { |
| // ^ |
| // |
| // pkg/front_end/testcases/patterns/exhaustiveness/intersect.dart:96:21: Error: The type 'T' is not exhaustively matched by the switch cases since it doesn't match 'false'. |
| // Try adding a wildcard pattern or cases that match 'false'. |
| // var a = switch (x2) /* Error */ { |
| // ^ |
| // |
| // pkg/front_end/testcases/patterns/exhaustiveness/intersect.dart:118:13: Error: The type 'T' is not exhaustively matched by the switch cases since it doesn't match 'true'. |
| // Try adding a default case or cases that match 'true'. |
| // switch (x1) /* Error */ { |
| // ^ |
| // |
| // pkg/front_end/testcases/patterns/exhaustiveness/intersect.dart:124:21: Error: The type 'T' is not exhaustively matched by the switch cases since it doesn't match 'true'. |
| // Try adding a wildcard pattern or cases that match 'true'. |
| // var a = switch (x2) /* Error */ { |
| // ^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| import "dart:_internal" as _in; |
| |
| static method exhaustiveBoundedTypeVariableByValue<T extends core::bool>(self::exhaustiveBoundedTypeVariableByValue::T x1, self::exhaustiveBoundedTypeVariableByValue::T x2) → dynamic { |
| #L1: |
| switch(x1) /* isExplicitlyExhaustive, self::exhaustiveBoundedTypeVariableByValue::T */ { |
| #L2: |
| case #C1: |
| case #C2: |
| { |
| break #L1; |
| } |
| #L3: |
| default: |
| throw{for-error-handling} new _in::ReachabilityError::•("`null` encountered as case in a switch statement with a non-nullable type."); |
| } |
| return block { |
| core::int #t1; |
| #L4: |
| switch(x2) /* isExplicitlyExhaustive, self::exhaustiveBoundedTypeVariableByValue::T */ { |
| #L5: |
| case #C1: |
| { |
| #t1 = 0; |
| break #L4; |
| } |
| #L6: |
| case #C2: |
| { |
| #t1 = 1; |
| break #L4; |
| } |
| #L7: |
| default: |
| throw{for-error-handling} new _in::ReachabilityError::•("`null` encountered as case in a switch expression with a non-nullable type."); |
| } |
| } =>#t1; |
| } |
| static method exhaustiveBoundedTypeVariableByType<T extends core::bool>(self::exhaustiveBoundedTypeVariableByType::T x1, self::exhaustiveBoundedTypeVariableByType::T x2) → dynamic { |
| #L8: |
| { |
| final synthesized self::exhaustiveBoundedTypeVariableByType::T #0#0 = x1; |
| { |
| if(true) { |
| { |
| break #L8; |
| } |
| } |
| } |
| throw{for-error-handling} new _in::ReachabilityError::•("`null` encountered as case in a switch statement with a non-nullable type."); |
| } |
| return block { |
| core::int #t2; |
| final synthesized self::exhaustiveBoundedTypeVariableByType::T #1#0 = x2; |
| #L9: |
| { |
| { |
| if(true) { |
| #t2 = 0; |
| break #L9; |
| } |
| } |
| throw{for-error-handling} new _in::ReachabilityError::•("`null` encountered as case in a switch expression with a non-nullable type."); |
| } |
| } =>#t2; |
| } |
| static method nonExhaustiveBoundedTypeVariable<T extends core::bool>(self::nonExhaustiveBoundedTypeVariable::T x1, self::nonExhaustiveBoundedTypeVariable::T x2) → dynamic { |
| #L10: |
| switch(x1) /* isExplicitlyExhaustive, self::nonExhaustiveBoundedTypeVariable::T */ { |
| #L11: |
| case #C1: |
| { |
| break #L10; |
| } |
| #L12: |
| default: |
| throw{for-error-handling} new _in::ReachabilityError::•("`null` encountered as case in a switch statement with a non-nullable type."); |
| } |
| return block { |
| core::int #t3; |
| #L13: |
| switch(x2) /* isExplicitlyExhaustive, self::nonExhaustiveBoundedTypeVariable::T */ { |
| #L14: |
| case #C1: |
| { |
| #t3 = 0; |
| break #L13; |
| } |
| #L15: |
| default: |
| throw{for-error-handling} new _in::ReachabilityError::•("`null` encountered as case in a switch expression with a non-nullable type."); |
| } |
| } =>#t3; |
| } |
| static method exhaustiveBoundedTypeVariableByBound<T extends core::bool>(self::exhaustiveBoundedTypeVariableByBound::T x1, self::exhaustiveBoundedTypeVariableByBound::T x2) → dynamic { |
| #L16: |
| { |
| final synthesized self::exhaustiveBoundedTypeVariableByBound::T #0#0 = x1; |
| { |
| if(true) { |
| { |
| break #L16; |
| } |
| } |
| } |
| throw{for-error-handling} new _in::ReachabilityError::•("`null` encountered as case in a switch statement with a non-nullable type."); |
| } |
| return block { |
| core::int #t4; |
| final synthesized self::exhaustiveBoundedTypeVariableByBound::T #1#0 = x2; |
| #L17: |
| { |
| { |
| if(true) { |
| #t4 = 0; |
| break #L17; |
| } |
| } |
| throw{for-error-handling} new _in::ReachabilityError::•("`null` encountered as case in a switch expression with a non-nullable type."); |
| } |
| } =>#t4; |
| } |
| static method nonExhaustiveBoundedTypeVariableByOtherType<T extends core::bool, S extends core::bool>(self::nonExhaustiveBoundedTypeVariableByOtherType::T x1, self::nonExhaustiveBoundedTypeVariableByOtherType::T x2) → dynamic { |
| #L18: |
| { |
| final synthesized self::nonExhaustiveBoundedTypeVariableByOtherType::T #0#0 = x1; |
| { |
| if(#0#0 is self::nonExhaustiveBoundedTypeVariableByOtherType::S) { |
| { |
| break #L18; |
| } |
| } |
| } |
| throw{for-error-handling} new _in::ReachabilityError::•("`null` encountered as case in a switch statement with a non-nullable type."); |
| } |
| return block { |
| core::int #t5; |
| final synthesized self::nonExhaustiveBoundedTypeVariableByOtherType::T #1#0 = x2; |
| #L19: |
| { |
| { |
| if(#1#0 is self::nonExhaustiveBoundedTypeVariableByOtherType::S) { |
| #t5 = 0; |
| break #L19; |
| } |
| } |
| throw{for-error-handling} new _in::ReachabilityError::•("`null` encountered as case in a switch expression with a non-nullable type."); |
| } |
| } =>#t5; |
| } |
| static method exhaustivePromotedTypeVariableByValue<T extends core::Object? = dynamic>(self::exhaustivePromotedTypeVariableByValue::T% x1, self::exhaustivePromotedTypeVariableByValue::T% x2) → dynamic { |
| if(x1 is core::bool) { |
| #L20: |
| switch(x1{self::exhaustivePromotedTypeVariableByValue::T% & core::bool /* '%' & '!' = '!' */}) /* isExplicitlyExhaustive, self::exhaustivePromotedTypeVariableByValue::T% & core::bool /* '%' & '!' = '!' */ */ { |
| #L21: |
| case #C1: |
| case #C2: |
| { |
| break #L20; |
| } |
| #L22: |
| default: |
| throw{for-error-handling} new _in::ReachabilityError::•("`null` encountered as case in a switch statement with a non-nullable type."); |
| } |
| } |
| if(x2 is core::bool) { |
| core::int a = block { |
| core::int #t6; |
| #L23: |
| switch(x2{self::exhaustivePromotedTypeVariableByValue::T% & core::bool /* '%' & '!' = '!' */}) /* isExplicitlyExhaustive, self::exhaustivePromotedTypeVariableByValue::T% & core::bool /* '%' & '!' = '!' */ */ { |
| #L24: |
| case #C1: |
| { |
| #t6 = 0; |
| break #L23; |
| } |
| #L25: |
| case #C2: |
| { |
| #t6 = 1; |
| break #L23; |
| } |
| #L26: |
| default: |
| throw{for-error-handling} new _in::ReachabilityError::•("`null` encountered as case in a switch expression with a non-nullable type."); |
| } |
| } =>#t6; |
| } |
| } |
| static method exhaustivePromotedTypeVariableByType<T extends core::Object? = dynamic>(self::exhaustivePromotedTypeVariableByType::T% x1, self::exhaustivePromotedTypeVariableByType::T% x2) → dynamic { |
| if(x1 is core::bool) { |
| #L27: |
| { |
| final synthesized self::exhaustivePromotedTypeVariableByType::T% & core::bool /* '%' & '!' = '!' */ #0#0 = x1{self::exhaustivePromotedTypeVariableByType::T% & core::bool /* '%' & '!' = '!' */}; |
| { |
| if(true) { |
| { |
| break #L27; |
| } |
| } |
| } |
| throw{for-error-handling} new _in::ReachabilityError::•("`null` encountered as case in a switch statement with a non-nullable type."); |
| } |
| } |
| if(x2 is core::bool) { |
| core::int a = block { |
| core::int #t7; |
| final synthesized self::exhaustivePromotedTypeVariableByType::T% & core::bool /* '%' & '!' = '!' */ #1#0 = x2{self::exhaustivePromotedTypeVariableByType::T% & core::bool /* '%' & '!' = '!' */}; |
| #L28: |
| { |
| { |
| if(true) { |
| #t7 = 0; |
| break #L28; |
| } |
| } |
| throw{for-error-handling} new _in::ReachabilityError::•("`null` encountered as case in a switch expression with a non-nullable type."); |
| } |
| } =>#t7; |
| } |
| } |
| static method nonExhaustivePromotedTypeVariable<T extends core::Object? = dynamic>(self::nonExhaustivePromotedTypeVariable::T% x1, self::nonExhaustivePromotedTypeVariable::T% x2) → dynamic { |
| if(x1 is core::bool) { |
| #L29: |
| switch(x1{self::nonExhaustivePromotedTypeVariable::T% & core::bool /* '%' & '!' = '!' */}) /* isExplicitlyExhaustive, self::nonExhaustivePromotedTypeVariable::T% & core::bool /* '%' & '!' = '!' */ */ { |
| #L30: |
| case #C1: |
| { |
| break #L29; |
| } |
| #L31: |
| default: |
| throw{for-error-handling} new _in::ReachabilityError::•("`null` encountered as case in a switch statement with a non-nullable type."); |
| } |
| } |
| if(x2 is core::bool) { |
| core::int a = block { |
| core::int #t8; |
| #L32: |
| switch(x2{self::nonExhaustivePromotedTypeVariable::T% & core::bool /* '%' & '!' = '!' */}) /* isExplicitlyExhaustive, self::nonExhaustivePromotedTypeVariable::T% & core::bool /* '%' & '!' = '!' */ */ { |
| #L33: |
| case #C1: |
| { |
| #t8 = 0; |
| break #L32; |
| } |
| #L34: |
| default: |
| throw{for-error-handling} new _in::ReachabilityError::•("`null` encountered as case in a switch expression with a non-nullable type."); |
| } |
| } =>#t8; |
| } |
| } |
| static method exhaustivePromotedTypeVariableByBound1<T extends core::Object? = dynamic>(self::exhaustivePromotedTypeVariableByBound1::T% x1, self::exhaustivePromotedTypeVariableByBound1::T% x2) → dynamic { |
| if(x1 is core::bool) { |
| #L35: |
| { |
| final synthesized self::exhaustivePromotedTypeVariableByBound1::T% & core::bool /* '%' & '!' = '!' */ #0#0 = x1{self::exhaustivePromotedTypeVariableByBound1::T% & core::bool /* '%' & '!' = '!' */}; |
| { |
| if(true) { |
| { |
| break #L35; |
| } |
| } |
| } |
| throw{for-error-handling} new _in::ReachabilityError::•("`null` encountered as case in a switch statement with a non-nullable type."); |
| } |
| } |
| if(x2 is core::bool) { |
| core::int a = block { |
| core::int #t9; |
| final synthesized self::exhaustivePromotedTypeVariableByBound1::T% & core::bool /* '%' & '!' = '!' */ #1#0 = x2{self::exhaustivePromotedTypeVariableByBound1::T% & core::bool /* '%' & '!' = '!' */}; |
| #L36: |
| { |
| { |
| if(true) { |
| #t9 = 0; |
| break #L36; |
| } |
| } |
| throw{for-error-handling} new _in::ReachabilityError::•("`null` encountered as case in a switch expression with a non-nullable type."); |
| } |
| } =>#t9; |
| } |
| } |
| static method nonExhaustivePromotedTypeVariableByOtherType<T extends core::Object? = dynamic, S extends core::bool>(self::nonExhaustivePromotedTypeVariableByOtherType::T% x1, self::nonExhaustivePromotedTypeVariableByOtherType::T% x2) → dynamic { |
| if(x1 is core::bool) { |
| #L37: |
| { |
| final synthesized self::nonExhaustivePromotedTypeVariableByOtherType::T% & core::bool /* '%' & '!' = '!' */ #0#0 = x1{self::nonExhaustivePromotedTypeVariableByOtherType::T% & core::bool /* '%' & '!' = '!' */}; |
| { |
| if(#0#0 is self::nonExhaustivePromotedTypeVariableByOtherType::S) { |
| { |
| break #L37; |
| } |
| } |
| } |
| throw{for-error-handling} new _in::ReachabilityError::•("`null` encountered as case in a switch statement with a non-nullable type."); |
| } |
| } |
| if(x2 is core::bool) { |
| core::int a = block { |
| core::int #t10; |
| final synthesized self::nonExhaustivePromotedTypeVariableByOtherType::T% & core::bool /* '%' & '!' = '!' */ #1#0 = x2{self::nonExhaustivePromotedTypeVariableByOtherType::T% & core::bool /* '%' & '!' = '!' */}; |
| #L38: |
| { |
| { |
| if(#1#0 is self::nonExhaustivePromotedTypeVariableByOtherType::S) { |
| #t10 = 0; |
| break #L38; |
| } |
| } |
| throw{for-error-handling} new _in::ReachabilityError::•("`null` encountered as case in a switch expression with a non-nullable type."); |
| } |
| } =>#t10; |
| } |
| } |
| |
| constants { |
| #C1 = true |
| #C2 = false |
| } |