blob: 970961883a84fea9b467b4d3bc2f67f6eae3603f [file] [log] [blame]
library;
//
// Problems in library:
//
// pkg/front_end/testcases/patterns/exhaustiveness/sealed_cast.dart:15:24: Error: The type 'M' is not exhaustively matched by the switch cases since it doesn't match 'C()'.
// - 'M' is from 'pkg/front_end/testcases/patterns/exhaustiveness/sealed_cast.dart'.
// Try adding a wildcard pattern or cases that match 'C()'.
// method(M m) => switch (m) {
// ^
//
import self as self;
import "dart:core" as core;
abstract sealed class M extends core::Object {
synthetic constructor •() self::M
: super core::Object::•()
;
}
class A extends self::M {
synthetic constructor •() self::A
: super self::M::•()
;
}
class B extends self::M {
synthetic constructor •() self::B
: super self::M::•()
;
}
class C extends self::M {
synthetic constructor •() self::C
: super self::M::•()
;
}
class D extends core::Object implements self::A, self::B {
synthetic constructor •() self::D
: super core::Object::•()
;
}
static method method(self::M m) dynamic
return block {
core::int #t1;
final synthesized self::M #0#0 = m;
#L1:
{
{
if(let final self::B #t2 = #0#0 as self::B in (#0#0 as self::B) is self::A) {
#t1 = 0;
break #L1;
}
}
{
if(true) {
#t1 = 1;
break #L1;
}
}
}
} =>#t1;
static method main() dynamic {
self::method(new self::B::•());
self::method(new self::D::•());
}