Files
kotlin-fork/compiler/fir/analysis-tests/testData/resolve/recursiveCallOnWhenWithSealedClass.fir.txt
T
Dmitriy Novozhilov 2d5b685535 [FIR] Fix processing constructors of sealed classes
- Allow declaring protected constructors in sealed classes
- Make default visibility of sealed class constructor `protected`

KT-44861
KT-44865
2021-02-12 13:36:41 +03:00

43 lines
1.3 KiB
Plaintext
Vendored

FILE: recursiveCallOnWhenWithSealedClass.kt
public sealed class Maybe<T> : R|kotlin/Any| {
protected constructor<T>(): R|Maybe<T>| {
super<R|kotlin/Any|>()
}
public final class Nope<T> : R|Maybe<T>| {
public constructor<T>(reasonForLog: R|kotlin/String|, reasonForUI: R|kotlin/String|): R|Maybe.Nope<T>| {
super<R|Maybe<T>|>()
}
public final val reasonForLog: R|kotlin/String| = R|<local>/reasonForLog|
public get(): R|kotlin/String|
public final val reasonForUI: R|kotlin/String| = R|<local>/reasonForUI|
public get(): R|kotlin/String|
}
public final class Yeah<T> : R|Maybe<T>| {
public constructor<T>(meat: R|T|): R|Maybe.Yeah<T>| {
super<R|Maybe<T>|>()
}
public final val meat: R|T| = R|<local>/meat|
public get(): R|T|
}
public final fun unwrap(): R|T| {
^unwrap when (this@R|/Maybe|) {
($subj$ is R|Maybe.Nope<T>|) -> {
throw R|java/lang/Exception.Exception|(String())
}
($subj$ is R|Maybe.Yeah<T>|) -> {
this@R|/Maybe|.R|SubstitutionOverride</Maybe.Yeah.meat: R|T|>|
}
}
}
}