blob: 99766a90ad9227104286c7ea327b1743cafeb428 [file] [log] [blame]
library;
//
// Problems in library:
//
// pkg/front_end/testcases/patterns/or_pattern_errors.dart:13:10: Error: Variable pattern 's2' is missing in this branch of the logical-or pattern.
// Try declaring this variable pattern in the branch.
// case Class(field1: var s1) || Class(field1: var s2):
// ^
//
// pkg/front_end/testcases/patterns/or_pattern_errors.dart:13:35: Error: Variable pattern 's1' is missing in this branch of the logical-or pattern.
// Try declaring this variable pattern in the branch.
// case Class(field1: var s1) || Class(field1: var s2):
// ^
//
// pkg/front_end/testcases/patterns/or_pattern_errors.dart:15:35: Error: Variable pattern 's1' is missing in this branch of the logical-or pattern.
// Try declaring this variable pattern in the branch.
// case Class(field1: var s1) || Class(field1: _):
// ^
//
// pkg/front_end/testcases/patterns/or_pattern_errors.dart:17:10: Error: Variable pattern 'field2' is missing in this branch of the logical-or pattern.
// Try declaring this variable pattern in the branch.
// case Class(field1: var field1, field2: var f)
// ^
//
// pkg/front_end/testcases/patterns/or_pattern_errors.dart:18:12: Error: Variable pattern 'f' is missing in this branch of the logical-or pattern.
// Try declaring this variable pattern in the branch.
// || Class(:var field1, :var field2):
// ^
//
import self as self;
import "dart:core" as core;
class Class extends core::Object {
field core::int? field1 = null;
field core::int? field2 = null;
field core::int? field3 = null;
synthetic constructor •() self::Class
: super core::Object::•()
;
}
static method test(dynamic o) dynamic {
#L1:
{
hoisted core::int? s2;
hoisted core::int? field2;
final synthesized dynamic #0#0 = o;
synthesized core::int? #0#2;
synthesized core::bool #0#2#isSet = false;
synthesized core::int? #0#3;
synthesized core::bool #0#3#isSet = false;
{
hoisted core::int? s1;
if(#0#0 is self::Class && (let final core::int? #t1 = s1 = #0#2#isSet ?{core::int?} #0#2{core::int?} : let final core::bool #t2 = #0#2#isSet = true in #0#2 = #0#0{self::Class}.{self::Class::field1}{core::int?} in true) || #0#0 is self::Class && (let final core::int? #t3 = s2 = #0#2#isSet ?{core::int?} #0#2{core::int?} : let final core::bool #t4 = #0#2#isSet = true in #0#2 = #0#0{self::Class}.{self::Class::field1}{core::int?} in true)) {
{
break #L1;
}
}
}
{
hoisted core::int? s1;
if(#0#0 is self::Class && (let final core::int? #t5 = s1 = #0#2#isSet ?{core::int?} #0#2{core::int?} : let final core::bool #t6 = #0#2#isSet = true in #0#2 = #0#0{self::Class}.{self::Class::field1}{core::int?} in true) || #0#0 is self::Class && (let final core::int? #t7 = #0#2#isSet ?{core::int?} #0#2{core::int?} : let final core::bool #t8 = #0#2#isSet = true in #0#2 = #0#0{self::Class}.{self::Class::field1}{core::int?} in true)) {
{
break #L1;
}
}
}
{
hoisted core::int? field1;
hoisted core::int? f;
if(#0#0 is self::Class && (let final core::int? #t9 = field1 = #0#2#isSet ?{core::int?} #0#2{core::int?} : let final core::bool #t10 = #0#2#isSet = true in #0#2 = #0#0{self::Class}.{self::Class::field1}{core::int?} in true) && (let final core::int? #t11 = f = #0#3#isSet ?{core::int?} #0#3{core::int?} : let final core::bool #t12 = #0#3#isSet = true in #0#3 = #0#0{self::Class}.{self::Class::field2}{core::int?} in true) || #0#0 is self::Class && (let final core::int? #t13 = field1 = #0#2#isSet ?{core::int?} #0#2{core::int?} : let final core::bool #t14 = #0#2#isSet = true in #0#2 = #0#0{self::Class}.{self::Class::field1}{core::int?} in true) && (let final core::int? #t15 = field2 = #0#3#isSet ?{core::int?} #0#3{core::int?} : let final core::bool #t16 = #0#3#isSet = true in #0#3 = #0#0{self::Class}.{self::Class::field2}{core::int?} in true)) {
{
break #L1;
}
}
}
{
{}
}
}
}