Files
kotlin-fork/compiler/fir/analysis-tests/testData/resolve/exhaustiveness_sealedSubClass.txt
T

117 lines
3.0 KiB
Plaintext
Vendored

FILE: exhaustiveness_sealedSubClass.kt
public sealed class A : R|kotlin/Any| {
private constructor(): R|A| {
super<R|kotlin/Any|>()
}
}
public sealed class B : R|A| {
private constructor(): R|B| {
super<R|A|>()
}
}
public final class C : R|A| {
public constructor(): R|C| {
super<R|A|>()
}
}
public sealed class D : R|B| {
private constructor(): R|D| {
super<R|B|>()
}
}
public sealed class E : R|B| {
private constructor(): R|E| {
super<R|B|>()
}
}
public final fun test_1(e: R|A|): R|kotlin/Unit| {
lval a: R|kotlin/Int| = when (R|<local>/e|) {
($subj$ is R|C|) -> {
Int(1)
}
($subj$ is R|D|) -> {
Int(2)
}
($subj$ is R|E|) -> {
Int(3)
}
}
.R|kotlin/Int.plus|(Int(0))
lval b: R|kotlin/Int| = when (R|<local>/e|) {
($subj$ is R|B|) -> {
Int(1)
}
($subj$ is R|C|) -> {
Int(2)
}
}
.R|kotlin/Int.plus|(Int(0))
lval c: R|kotlin/Int| = when (R|<local>/e|) {
($subj$ is R|B|) -> {
Int(1)
}
($subj$ is R|C|) -> {
Int(2)
}
($subj$ is R|E|) -> {
Int(3)
}
($subj$ is R|D|) -> {
Int(4)
}
}
.R|kotlin/Int.plus|(Int(0))
lval d: R|kotlin/Int| = when (R|<local>/e|) {
($subj$ is R|E|) -> {
Int(1)
}
($subj$ is R|A|) -> {
Int(2)
}
}
.R|kotlin/Int.plus|(Int(0))
}
public final fun test_2(e: R|A|): R|kotlin/Unit| {
lval a: R|ERROR CLASS: Unresolved name: plus| = when (R|<local>/e|) {
($subj$ is R|D|) -> {
Int(1)
}
($subj$ is R|E|) -> {
Int(2)
}
}
.<Unresolved name: plus>#(Int(0))
lval b: R|ERROR CLASS: Unresolved name: plus| = when (R|<local>/e|) {
($subj$ is R|B|) -> {
Int(1)
}
($subj$ is R|D|) -> {
Int(2)
}
($subj$ is R|E|) -> {
Int(3)
}
}
.<Unresolved name: plus>#(Int(0))
lval c: R|ERROR CLASS: Unresolved name: plus| = when (R|<local>/e|) {
($subj$ is R|B|) -> {
Int(1)
}
($subj$ is R|D|) -> {
Int(2)
}
}
.<Unresolved name: plus>#(Int(0))
lval d: R|ERROR CLASS: Unresolved name: plus| = when (R|<local>/e|) {
($subj$ is R|C|) -> {
Int(1)
}
}
.<Unresolved name: plus>#(Int(0))
}