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