9b9c51bc8d
1. Inner class constructor should have its outer class as a dispatch receiver, since it is necessary for the call. Before it was null 2. Substituted inner class constructor should have its original dispatch receiver type with the proper substitution. Before it was set to the class itself (since the class was usually passed as a new dispatch receiver) Also, modify FIR renderer, so it properly renders the dispatch receiver of the constructors
27 lines
757 B
Plaintext
Vendored
27 lines
757 B
Plaintext
Vendored
FILE: localInnerClass.kt
|
|
public abstract interface Foo : R|kotlin/Any| {
|
|
}
|
|
public final fun bar(): R|kotlin/Unit| {
|
|
object : R|Foo| {
|
|
private constructor(): R|<anonymous>| {
|
|
super<R|kotlin/Any|>()
|
|
}
|
|
|
|
public final fun foo(): R|Foo| {
|
|
^foo this@R|/<anonymous>|.R|/<anonymous>.Derived.Derived|(Int(42))
|
|
}
|
|
|
|
local final inner class Derived : R|Foo| {
|
|
public <anonymous>.constructor(x: R|kotlin/Int|): R|<anonymous>.Derived| {
|
|
super<R|kotlin/Any|>()
|
|
}
|
|
|
|
public final val x: R|kotlin/Int| = R|<local>/x|
|
|
public get(): R|kotlin/Int|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|