blob: d5319b8ca79dba22e69bf2ca04091cc31eda1870 [file] [log] [blame]
library;
//
// Problems in library:
//
// pkg/front_end/testcases/patterns/exhaustiveness/list.dart:37:51: Error: The type 'List<num>' is not exhaustively matched by the switch cases since it doesn't match '[]'.
// - 'List' is from 'dart:core'.
// Try adding a wildcard pattern or cases that match '[]'.
// nonExhaustive1aMissing(List<num> list) => switch (list) {
// ^
//
// pkg/front_end/testcases/patterns/exhaustiveness/list.dart:41:51: Error: The type 'List<num>' is not exhaustively matched by the switch cases since it doesn't match '[]'.
// - 'List' is from 'dart:core'.
// Try adding a wildcard pattern or cases that match '[]'.
// nonExhaustive1bMissing(List<num> list) => switch (list) {
// ^
//
// pkg/front_end/testcases/patterns/exhaustiveness/list.dart:45:51: Error: The type 'List<num>' is not exhaustively matched by the switch cases since it doesn't match '[_]'.
// - 'List' is from 'dart:core'.
// Try adding a wildcard pattern or cases that match '[_]'.
// nonExhaustive2aMissing(List<num> list) => switch (list) {
// ^
//
// pkg/front_end/testcases/patterns/exhaustiveness/list.dart:50:51: Error: The type 'List<num>' is not exhaustively matched by the switch cases since it doesn't match '[_]'.
// - 'List' is from 'dart:core'.
// Try adding a wildcard pattern or cases that match '[_]'.
// nonExhaustive2bMissing(List<num> list) => switch (list) {
// ^
//
// pkg/front_end/testcases/patterns/exhaustiveness/list.dart:55:51: Error: The type 'List<num>' is not exhaustively matched by the switch cases since it doesn't match '[_]'.
// - 'List' is from 'dart:core'.
// Try adding a wildcard pattern or cases that match '[_]'.
// nonExhaustive2cMissing(List<num> list) => switch (list) {
// ^
//
// pkg/front_end/testcases/patterns/exhaustiveness/list.dart:60:56: Error: The type 'List<num>' is not exhaustively matched by the switch cases since it doesn't match '[...[...]]'.
// - 'List' is from 'dart:core'.
// Try adding a wildcard pattern or cases that match '[...]'.
// nonExhaustiveRestrictedType(List<num> list) => switch (list) {
// ^
//
// pkg/front_end/testcases/patterns/exhaustiveness/list.dart:64:59: Error: The type 'List<num>' is not exhaustively matched by the switch cases since it doesn't match '[double(), ...[...]]'.
// - 'List' is from 'dart:core'.
// Try adding a wildcard pattern or cases that match '[double(), ...]'.
// nonExhaustive1aRestrictedValue(List<num> list) => switch (list) {
// ^
//
// pkg/front_end/testcases/patterns/exhaustiveness/list.dart:69:58: Error: The type 'List<num>' is not exhaustively matched by the switch cases since it doesn't match '[]'.
// - 'List' is from 'dart:core'.
// Try adding a wildcard pattern or cases that match '[]'.
// nonExhaustive1aRestrictedType(List<num> list) => switch (list) {
// ^
//
// pkg/front_end/testcases/patterns/exhaustiveness/list.dart:74:59: Error: The type 'List<num>' is not exhaustively matched by the switch cases since it doesn't match '[...[...], double()]'.
// - 'List' is from 'dart:core'.
// Try adding a wildcard pattern or cases that match '[..., double()]'.
// nonExhaustive1bRestrictedValue(List<num> list) => switch (list) {
// ^
//
// pkg/front_end/testcases/patterns/exhaustiveness/list.dart:79:58: Error: The type 'List<num>' is not exhaustively matched by the switch cases since it doesn't match '[...[...], double()]'.
// - 'List' is from 'dart:core'.
// Try adding a wildcard pattern or cases that match '[..., double()]'.
// nonExhaustive1bRestrictedType(List<num> list) => switch (list) {
// ^
//
// pkg/front_end/testcases/patterns/exhaustiveness/list.dart:84:59: Error: The type 'List<num>' is not exhaustively matched by the switch cases since it doesn't match '[double()]'.
// - 'List' is from 'dart:core'.
// Try adding a wildcard pattern or cases that match '[double()]'.
// nonExhaustive2aRestrictedValue(List<num> list) => switch (list) {
// ^
//
// pkg/front_end/testcases/patterns/exhaustiveness/list.dart:90:59: Error: The type 'List<num>' is not exhaustively matched by the switch cases since it doesn't match '[double(), double(), ...[...]]'.
// - 'List' is from 'dart:core'.
// Try adding a wildcard pattern or cases that match '[double(), double(), ...]'.
// nonExhaustive2bRestrictedValue(List<num> list) => switch (list) {
// ^
//
// pkg/front_end/testcases/patterns/exhaustiveness/list.dart:96:59: Error: The type 'List<num>' is not exhaustively matched by the switch cases since it doesn't match '[double(), double(), ...[...]]'.
// - 'List' is from 'dart:core'.
// Try adding a wildcard pattern or cases that match '[double(), double(), ...]'.
// nonExhaustive2cRestrictedValue(List<num> list) => switch (list) {
// ^
//
// pkg/front_end/testcases/patterns/exhaustiveness/list.dart:102:59: Error: The type 'List<num>' is not exhaustively matched by the switch cases since it doesn't match '[double(), _, ...[...]]'.
// - 'List' is from 'dart:core'.
// Try adding a wildcard pattern or cases that match '[double(), _, ...]'.
// nonExhaustive2dRestrictedValue(List<num> list) => switch (list) {
// ^
//
// pkg/front_end/testcases/patterns/exhaustiveness/list.dart:108:59: Error: The type 'List<num>' is not exhaustively matched by the switch cases since it doesn't match '[_, double()]'.
// - 'List' is from 'dart:core'.
// Try adding a wildcard pattern or cases that match '[_, double()]'.
// nonExhaustive2eRestrictedValue(List<num> list) => switch (list) {
// ^
//
// pkg/front_end/testcases/patterns/exhaustiveness/list.dart:114:59: Error: The type 'List<num>' is not exhaustively matched by the switch cases since it doesn't match '[_, double()]'.
// - 'List' is from 'dart:core'.
// Try adding a wildcard pattern or cases that match '[_, double()]'.
// nonExhaustive2fRestrictedValue(List<num> list) => switch (list) {
// ^
//
import self as self;
import "dart:core" as core;
static method exhaustive(core::List<core::num> list) dynamic
return block {
core::int #t1;
final synthesized core::List<core::num> #0#0 = list;
#L1:
{
{
if(true) {
#t1 = 0;
break #L1;
}
}
}
} =>#t1;
static method exhaustive1a(core::List<core::num> list) dynamic
return block {
core::int #t2;
final synthesized core::List<core::num> #0#0 = list;
function ##0#1#initializer() → core::int
return #0#0.{core::List::length}{core::int};
late final synthesized core::int #0#1 = ##0#1#initializer(){() → core::int};
#L2:
{
{
if(#0#1.{core::num::<=}(#C1){(core::num) → core::bool}) {
#t2 = 0;
break #L2;
}
}
{
if(#0#1.{core::num::>=}(#C2){(core::num) → core::bool}) {
#t2 = 1;
break #L2;
}
}
}
} =>#t2;
static method exhaustive1b(core::List<core::num> list) dynamic
return block {
core::int #t3;
final synthesized core::List<core::num> #0#0 = list;
function ##0#1#initializer() → core::int
return #0#0.{core::List::length}{core::int};
late final synthesized core::int #0#1 = ##0#1#initializer(){() → core::int};
#L3:
{
{
if(#0#1.{core::num::<=}(#C1){(core::num) → core::bool}) {
#t3 = 0;
break #L3;
}
}
{
if(#0#1.{core::num::>=}(#C2){(core::num) → core::bool}) {
#t3 = 1;
break #L3;
}
}
}
} =>#t3;
static method exhaustive2a(core::List<core::num> list) dynamic
return block {
core::int #t4;
final synthesized core::List<core::num> #0#0 = list;
function ##0#1#initializer() → core::int
return #0#0.{core::List::length}{core::int};
late final synthesized core::int #0#1 = ##0#1#initializer(){() → core::int};
#L4:
{
{
if(#0#1.{core::num::<=}(#C1){(core::num) → core::bool}) {
#t4 = 0;
break #L4;
}
}
{
if(#0#1 =={core::num::==}{(core::Object) → core::bool} #C2) {
#t4 = 1;
break #L4;
}
}
{
if(#0#1.{core::num::>=}(#C3){(core::num) → core::bool}) {
#t4 = 2;
break #L4;
}
}
}
} =>#t4;
static method exhaustive2b(core::List<core::num> list) dynamic
return block {
core::int #t5;
final synthesized core::List<core::num> #0#0 = list;
function ##0#1#initializer() → core::int
return #0#0.{core::List::length}{core::int};
late final synthesized core::int #0#1 = ##0#1#initializer(){() → core::int};
#L5:
{
{
if(#0#1.{core::num::<=}(#C1){(core::num) → core::bool}) {
#t5 = 0;
break #L5;
}
}
{
if(#0#1 =={core::num::==}{(core::Object) → core::bool} #C2) {
#t5 = 1;
break #L5;
}
}
{
if(#0#1.{core::num::>=}(#C3){(core::num) → core::bool}) {
#t5 = 2;
break #L5;
}
}
}
} =>#t5;
static method exhaustive2c(core::List<core::num> list) dynamic
return block {
core::int #t6;
final synthesized core::List<core::num> #0#0 = list;
function ##0#1#initializer() → core::int
return #0#0.{core::List::length}{core::int};
late final synthesized core::int #0#1 = ##0#1#initializer(){() → core::int};
#L6:
{
{
if(#0#1.{core::num::<=}(#C1){(core::num) → core::bool}) {
#t6 = 0;
break #L6;
}
}
{
if(#0#1 =={core::num::==}{(core::Object) → core::bool} #C2) {
#t6 = 1;
break #L6;
}
}
{
if(#0#1.{core::num::>=}(#C3){(core::num) → core::bool}) {
#t6 = 2;
break #L6;
}
}
}
} =>#t6;
static method nonExhaustive1aMissing(core::List<core::num> list) dynamic
return block {
core::int #t7;
final synthesized core::List<core::num> #0#0 = list;
#L7:
{
{
if(#0#0.{core::List::length}{core::int}.{core::num::>=}(#C2){(core::num) → core::bool}) {
#t7 = 1;
break #L7;
}
}
}
} =>#t7;
static method nonExhaustive1bMissing(core::List<core::num> list) dynamic
return block {
core::int #t8;
final synthesized core::List<core::num> #0#0 = list;
#L8:
{
{
if(#0#0.{core::List::length}{core::int}.{core::num::>=}(#C2){(core::num) → core::bool}) {
#t8 = 1;
break #L8;
}
}
}
} =>#t8;
static method nonExhaustive2aMissing(core::List<core::num> list) dynamic
return block {
core::int #t9;
final synthesized core::List<core::num> #0#0 = list;
function ##0#1#initializer() → core::int
return #0#0.{core::List::length}{core::int};
late final synthesized core::int #0#1 = ##0#1#initializer(){() → core::int};
#L9:
{
{
if(#0#1.{core::num::<=}(#C1){(core::num) → core::bool}) {
#t9 = 0;
break #L9;
}
}
{
if(#0#1.{core::num::>=}(#C3){(core::num) → core::bool}) {
#t9 = 2;
break #L9;
}
}
}
} =>#t9;
static method nonExhaustive2bMissing(core::List<core::num> list) dynamic
return block {
core::int #t10;
final synthesized core::List<core::num> #0#0 = list;
function ##0#1#initializer() → core::int
return #0#0.{core::List::length}{core::int};
late final synthesized core::int #0#1 = ##0#1#initializer(){() → core::int};
#L10:
{
{
if(#0#1.{core::num::<=}(#C1){(core::num) → core::bool}) {
#t10 = 0;
break #L10;
}
}
{
if(#0#1.{core::num::>=}(#C3){(core::num) → core::bool}) {
#t10 = 2;
break #L10;
}
}
}
} =>#t10;
static method nonExhaustive2cMissing(core::List<core::num> list) dynamic
return block {
core::int #t11;
final synthesized core::List<core::num> #0#0 = list;
function ##0#1#initializer() → core::int
return #0#0.{core::List::length}{core::int};
late final synthesized core::int #0#1 = ##0#1#initializer(){() → core::int};
#L11:
{
{
if(#0#1.{core::num::<=}(#C1){(core::num) → core::bool}) {
#t11 = 0;
break #L11;
}
}
{
if(#0#1.{core::num::>=}(#C3){(core::num) → core::bool}) {
#t11 = 2;
break #L11;
}
}
}
} =>#t11;
static method nonExhaustiveRestrictedType(core::List<core::num> list) dynamic
return block {
core::int #t12;
final synthesized core::List<core::num> #0#0 = list;
#L12:
{
{
if(#0#0.{core::List::sublist}(0){(core::int, [core::int?]) → core::List<core::num>} is core::List<core::int>) {
#t12 = 0;
break #L12;
}
}
}
} =>#t12;
static method nonExhaustive1aRestrictedValue(core::List<core::num> list) dynamic
return block {
core::int #t13;
final synthesized core::List<core::num> #0#0 = list;
function ##0#1#initializer() → core::int
return #0#0.{core::List::length}{core::int};
late final synthesized core::int #0#1 = ##0#1#initializer(){() → core::int};
#L13:
{
{
if(#0#1.{core::num::<=}(#C1){(core::num) → core::bool}) {
#t13 = 0;
break #L13;
}
}
{
if(#0#1.{core::num::>=}(#C2){(core::num) → core::bool} && #C2 =={core::num::==}{(core::Object) → core::bool} #0#0.{core::List::[]}(0){(core::int) → core::num}) {
#t13 = 1;
break #L13;
}
}
}
} =>#t13;
static method nonExhaustive1aRestrictedType(core::List<core::num> list) dynamic
return block {
core::int #t14;
final synthesized core::List<core::num> #0#0 = list;
synthesized core::int #0#2;
synthesized core::bool #0#2#isSet = false;
#L14:
{
{
if(#0#0 is core::List<core::int> && (#0#2#isSet ?{core::int} #0#2{core::int} : let final core::bool* #t15 = #0#2#isSet = true in #0#2 = #0#0{core::List<core::int>}.{core::List::length}{core::int}).{core::num::<=}(#C1){(core::num) → core::bool}) {
#t14 = 0;
break #L14;
}
}
{
if((#0#2#isSet ?{core::int} #0#2{core::int} : let final core::bool* #t16 = #0#2#isSet = true in #0#2 = #0#0.{core::List::length}{core::int}).{core::num::>=}(#C2){(core::num) → core::bool}) {
#t14 = 1;
break #L14;
}
}
}
} =>#t14;
static method nonExhaustive1bRestrictedValue(core::List<core::num> list) dynamic
return block {
core::int #t17;
final synthesized core::List<core::num> #0#0 = list;
function ##0#1#initializer() → core::int
return #0#0.{core::List::length}{core::int};
late final synthesized core::int #0#1 = ##0#1#initializer(){() → core::int};
#L15:
{
{
if(#0#1.{core::num::<=}(#C1){(core::num) → core::bool}) {
#t17 = 0;
break #L15;
}
}
{
if(#0#1.{core::num::>=}(#C2){(core::num) → core::bool} && #C2 =={core::num::==}{(core::Object) → core::bool} #0#0.{core::List::[]}(#0#1.{core::num::-}(1){(core::num) → core::int}){(core::int) → core::num}) {
#t17 = 1;
break #L15;
}
}
}
} =>#t17;
static method nonExhaustive1bRestrictedType(core::List<core::num> list) dynamic
return block {
core::int #t18;
final synthesized core::List<core::num> #0#0 = list;
function ##0#1#initializer() → core::int
return #0#0.{core::List::length}{core::int};
late final synthesized core::int #0#1 = ##0#1#initializer(){() → core::int};
#L16:
{
{
if(#0#1.{core::num::<=}(#C1){(core::num) → core::bool}) {
#t18 = 0;
break #L16;
}
}
{
if(#0#1.{core::num::>=}(#C2){(core::num) → core::bool} && #0#0.{core::List::sublist}(0, #0#1.{core::num::-}(1){(core::num) → core::int}){(core::int, [core::int?]) → core::List<core::num>} is core::List<core::int>) {
#t18 = 1;
break #L16;
}
}
}
} =>#t18;
static method nonExhaustive2aRestrictedValue(core::List<core::num> list) dynamic
return block {
core::int #t19;
final synthesized core::List<core::num> #0#0 = list;
function ##0#1#initializer() → core::int
return #0#0.{core::List::length}{core::int};
late final synthesized core::int #0#1 = ##0#1#initializer(){() → core::int};
#L17:
{
{
if(#0#1.{core::num::<=}(#C1){(core::num) → core::bool}) {
#t19 = 0;
break #L17;
}
}
{
if(#0#1 =={core::num::==}{(core::Object) → core::bool} #C2 && #C2 =={core::num::==}{(core::Object) → core::bool} #0#0.{core::List::[]}(0){(core::int) → core::num}) {
#t19 = 1;
break #L17;
}
}
{
if(#0#1.{core::num::>=}(#C3){(core::num) → core::bool}) {
#t19 = 2;
break #L17;
}
}
}
} =>#t19;
static method nonExhaustive2bRestrictedValue(core::List<core::num> list) dynamic
return block {
core::int #t20;
final synthesized core::List<core::num> #0#0 = list;
function ##0#1#initializer() → core::int
return #0#0.{core::List::length}{core::int};
late final synthesized core::int #0#1 = ##0#1#initializer(){() → core::int};
#L18:
{
{
if(#0#1.{core::num::<=}(#C1){(core::num) → core::bool}) {
#t20 = 0;
break #L18;
}
}
{
if(#0#1 =={core::num::==}{(core::Object) → core::bool} #C2) {
#t20 = 1;
break #L18;
}
}
{
if(#0#1.{core::num::>=}(#C3){(core::num) → core::bool} && #C2 =={core::num::==}{(core::Object) → core::bool} #0#0.{core::List::[]}(0){(core::int) → core::num}) {
#t20 = 2;
break #L18;
}
}
}
} =>#t20;
static method nonExhaustive2cRestrictedValue(core::List<core::num> list) dynamic
return block {
core::int #t21;
final synthesized core::List<core::num> #0#0 = list;
function ##0#1#initializer() → core::int
return #0#0.{core::List::length}{core::int};
late final synthesized core::int #0#1 = ##0#1#initializer(){() → core::int};
#L19:
{
{
if(#0#1.{core::num::<=}(#C1){(core::num) → core::bool}) {
#t21 = 0;
break #L19;
}
}
{
if(#0#1 =={core::num::==}{(core::Object) → core::bool} #C2) {
#t21 = 1;
break #L19;
}
}
{
if(#0#1.{core::num::>=}(#C3){(core::num) → core::bool} && #C2 =={core::num::==}{(core::Object) → core::bool} #0#0.{core::List::[]}(1){(core::int) → core::num}) {
#t21 = 2;
break #L19;
}
}
}
} =>#t21;
static method nonExhaustive2dRestrictedValue(core::List<core::num> list) dynamic
return block {
core::int #t22;
final synthesized core::List<core::num> #0#0 = list;
function ##0#1#initializer() → core::int
return #0#0.{core::List::length}{core::int};
late final synthesized core::int #0#1 = ##0#1#initializer(){() → core::int};
#L20:
{
{
if(#0#1.{core::num::<=}(#C1){(core::num) → core::bool}) {
#t22 = 0;
break #L20;
}
}
{
if(#0#1 =={core::num::==}{(core::Object) → core::bool} #C2) {
#t22 = 1;
break #L20;
}
}
{
if(#0#1.{core::num::>=}(#C3){(core::num) → core::bool} && #C2 =={core::num::==}{(core::Object) → core::bool} #0#0.{core::List::[]}(#0#1.{core::num::-}(1){(core::num) → core::int}){(core::int) → core::num}) {
#t22 = 2;
break #L20;
}
}
}
} =>#t22;
static method nonExhaustive2eRestrictedValue(core::List<core::num> list) dynamic
return block {
core::int #t23;
final synthesized core::List<core::num> #0#0 = list;
function ##0#1#initializer() → core::int
return #0#0.{core::List::length}{core::int};
late final synthesized core::int #0#1 = ##0#1#initializer(){() → core::int};
#L21:
{
{
if(#0#1.{core::num::<=}(#C1){(core::num) → core::bool}) {
#t23 = 0;
break #L21;
}
}
{
if(#0#1 =={core::num::==}{(core::Object) → core::bool} #C2) {
#t23 = 1;
break #L21;
}
}
{
if(#0#1.{core::num::>=}(#C3){(core::num) → core::bool} && #C2 =={core::num::==}{(core::Object) → core::bool} #0#0.{core::List::[]}(#0#1.{core::num::-}(2){(core::num) → core::int}){(core::int) → core::num}) {
#t23 = 2;
break #L21;
}
}
}
} =>#t23;
static method nonExhaustive2fRestrictedValue(core::List<core::num> list) dynamic
return block {
core::int #t24;
final synthesized core::List<core::num> #0#0 = list;
function ##0#1#initializer() → core::int
return #0#0.{core::List::length}{core::int};
late final synthesized core::int #0#1 = ##0#1#initializer(){() → core::int};
#L22:
{
{
if(#0#1.{core::num::<=}(#C1){(core::num) → core::bool}) {
#t24 = 0;
break #L22;
}
}
{
if(#0#1 =={core::num::==}{(core::Object) → core::bool} #C2) {
#t24 = 1;
break #L22;
}
}
{
if(#0#1.{core::num::>=}(#C3){(core::num) → core::bool} && #C2 =={core::num::==}{(core::Object) → core::bool} #0#0.{core::List::[]}(#0#1.{core::num::-}(1){(core::num) → core::int}){(core::int) → core::num}) {
#t24 = 2;
break #L22;
}
}
}
} =>#t24;
constants {
#C1 = 0
#C2 = 1
#C3 = 2
}