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
183 lines
4.9 KiB
Plaintext
Vendored
183 lines
4.9 KiB
Plaintext
Vendored
FILE: RedundantVisibilityModifierChecker.kt
|
|
public final fun f(): R|kotlin/Unit| {
|
|
lvar baz: R|kotlin/Int| = Int(0)
|
|
local final class LocalClass : R|kotlin/Any| {
|
|
public constructor(): R|LocalClass| {
|
|
super<R|kotlin/Any|>()
|
|
}
|
|
|
|
internal final var foo: R|kotlin/Int| = Int(0)
|
|
internal get(): R|kotlin/Int|
|
|
internal set(value: R|kotlin/Int|): R|kotlin/Unit|
|
|
|
|
}
|
|
|
|
R|/LocalClass.LocalClass|().R|<local>/foo| = Int(1)
|
|
}
|
|
internal final inline fun internal(): R|kotlin/Unit| {
|
|
R|/f|()
|
|
}
|
|
public final class C : R|kotlin/Any| {
|
|
public constructor(): R|C| {
|
|
super<R|kotlin/Any|>()
|
|
}
|
|
|
|
internal final val z: R|kotlin/Any| = object : R|kotlin/Any| {
|
|
private constructor(): R|<anonymous>| {
|
|
super<R|kotlin/Any|>()
|
|
}
|
|
|
|
public final fun foo(): R|kotlin/Int| {
|
|
^foo Int(13)
|
|
}
|
|
|
|
}
|
|
|
|
internal get(): R|kotlin/Any|
|
|
|
|
}
|
|
public final class Foo2<T1, T2 : R|T1|> : R|kotlin/Any| {
|
|
public constructor<T1, T2 : R|T1|>(): R|Foo2<T1, T2>| {
|
|
super<R|kotlin/Any|>()
|
|
}
|
|
|
|
public final fun <T1, T2> foo2(): R|kotlin/Unit| {
|
|
}
|
|
|
|
internal final inner class B<T, T2, T1, T2 : R|T1|> : R|kotlin/Any| {
|
|
public Foo2<T1, T2>.constructor<T, T2>(): R|Foo2.B<T, T2, T1, T2>| {
|
|
super<R|kotlin/Any|>()
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
public final class C : R|kotlin/Any| {
|
|
public constructor(): R|C| {
|
|
super<R|kotlin/Any|>()
|
|
}
|
|
|
|
public final val foo: R|kotlin/Int| = Int(0)
|
|
public get(): R|kotlin/Int|
|
|
|
|
public final fun bar(): R|kotlin/Unit| {
|
|
}
|
|
|
|
}
|
|
public open class D : R|kotlin/Any| {
|
|
public constructor(): R|D| {
|
|
super<R|kotlin/Any|>()
|
|
}
|
|
|
|
protected open fun willRemainProtected(): R|kotlin/Unit| {
|
|
}
|
|
|
|
protected open fun willBecomePublic(): R|kotlin/Unit| {
|
|
}
|
|
|
|
}
|
|
public final class E : R|D| {
|
|
public constructor(): R|E| {
|
|
super<R|D|>()
|
|
}
|
|
|
|
protected final override fun willRemainProtected(): R|kotlin/Unit| {
|
|
}
|
|
|
|
public final override fun willBecomePublic(): R|kotlin/Unit| {
|
|
}
|
|
|
|
}
|
|
public final enum class F : R|kotlin/Enum<F>| {
|
|
private constructor(x: R|kotlin/Int|): R|F| {
|
|
super<R|kotlin/Enum<F>|>()
|
|
}
|
|
|
|
public final val x: R|kotlin/Int| = R|<local>/x|
|
|
public get(): R|kotlin/Int|
|
|
|
|
public final static enum entry FIRST: R|F| = object : R|F| {
|
|
private constructor(): R|<anonymous>| {
|
|
super<R|F|>(Int(42))
|
|
}
|
|
|
|
}
|
|
|
|
public final static fun values(): R|kotlin/Array<F>| {
|
|
}
|
|
|
|
public final static fun valueOf(value: R|kotlin/String|): R|F| {
|
|
}
|
|
|
|
}
|
|
public sealed class G : R|kotlin/Any| {
|
|
protected constructor(y: R|kotlin/Int|): R|G| {
|
|
super<R|kotlin/Any|>()
|
|
}
|
|
|
|
public final val y: R|kotlin/Int| = R|<local>/y|
|
|
public get(): R|kotlin/Int|
|
|
|
|
private constructor(): R|G| {
|
|
this<R|G|>(Int(42))
|
|
}
|
|
|
|
public final object H : R|G| {
|
|
private constructor(): R|G.H| {
|
|
super<R|G|>()
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
public abstract interface I : R|kotlin/Any| {
|
|
public abstract fun bar(): R|kotlin/Unit|
|
|
|
|
}
|
|
public final var baz: R|kotlin/Int| = Int(0)
|
|
public get(): R|kotlin/Int|
|
|
public set(value: R|kotlin/Int|): R|kotlin/Unit|
|
|
public open class J : R|kotlin/Any| {
|
|
public constructor(): R|J| {
|
|
super<R|kotlin/Any|>()
|
|
}
|
|
|
|
protected final val baz: R|kotlin/Int| = Int(0)
|
|
protected get(): R|kotlin/Int| {
|
|
^ this@R|/J|.F|/J.baz|.R|kotlin/Int.times|(Int(2))
|
|
}
|
|
|
|
public final var baf: R|kotlin/Int| = Int(0)
|
|
public get(): R|kotlin/Int| {
|
|
^ Int(1)
|
|
}
|
|
public set(value: R|kotlin/Int|): R|kotlin/Unit| {
|
|
this@R|/J|.F|/J.baf| = R|<local>/value|
|
|
}
|
|
|
|
public final var buf: R|kotlin/Int| = Int(0)
|
|
private get(): R|kotlin/Int| {
|
|
^ Int(42)
|
|
}
|
|
protected set(value: R|kotlin/Int|): R|kotlin/Unit| {
|
|
this@R|/J|.F|/J.buf| = R|<local>/value|
|
|
}
|
|
|
|
public final var bar: R|kotlin/Int| = Int(0)
|
|
public get(): R|kotlin/Int| {
|
|
^ Double(3.1415926535)
|
|
}
|
|
public set(value: R|kotlin/Int|): R|kotlin/Unit| {
|
|
}
|
|
|
|
}
|
|
private final class Foo : R|kotlin/Any| {
|
|
public constructor(): R|Foo| {
|
|
super<R|kotlin/Any|>()
|
|
}
|
|
|
|
internal final fun barBarian(): R|kotlin/Unit| {
|
|
}
|
|
|
|
}
|