blob: be04baa30101a038815ac91350c5718f981532c0 [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;
late final synthesized core::int? #0#2 = (#0#0 as{Unchecked} self::Class).{self::Class::field1}{core::int?};
late final synthesized core::int? #0#3 = (#0#0 as{Unchecked} self::Class).{self::Class::field2}{core::int?};
{
hoisted core::int? s1;
if(#0#0 is self::Class && (let final dynamic #t1 = s1 = #0#2 in true) || #0#0 is self::Class && (let final dynamic #t2 = s2 = #0#2 in true)) {
{
break #L1;
}
}
}
{
hoisted core::int? s1;
if(#0#0 is self::Class && (let final dynamic #t3 = s1 = #0#2 in true) || #0#0 is self::Class && (let final dynamic #t4 = #0#2 in true)) {
{
break #L1;
}
}
}
{
hoisted core::int? field1;
hoisted core::int? f;
if(#0#0 is self::Class && (let final dynamic #t5 = field1 = #0#2 in true) && (let final dynamic #t6 = f = #0#3 in true) || #0#0 is self::Class && (let final dynamic #t7 = field1 = #0#2 in true) && (let final dynamic #t8 = field2 = #0#3 in true)) {
{
break #L1;
}
}
}
{
{}
}
}
}