[FIR] Properly assign <local> packages to symbols

This prevents `FirConflictsExpressionChecker.kt`
from missing conflicting local functions. It used
to due to inconsistencies in assigning `<local>`,
and this commit makes it a bit more
straightforward.

The change in KtClassTypeQualifierRenderer
prevents `FirOverrideImplementTest.testLocalClass`
from failing in `intellij`. It didn't fail for
callables, because `KtCallableSignatureRenderer`
doesn't try to render packages.

^KT-59186 Fixed
This commit is contained in:
Nikolay Lunyak
2023-08-09 15:18:03 +03:00
committed by Space Team
parent cf655fd5ad
commit f9c6af4d2a
107 changed files with 733 additions and 891 deletions
@@ -28,7 +28,7 @@ FILE: danglingAnnotationsClassLevel.kt
public? final? fun withLocal(): R|kotlin/Unit| {
local final? class Local : R|kotlin/Any| {
public? [ContainingClassKey=Local] constructor(): R|Outer.Local| {
public? [ContainingClassKey=Local] constructor(): R|<local>/Local| {
super<R|kotlin/Any|>()
}
@@ -5,9 +5,9 @@ FILE: enums3.kt
}
init {
local final? enum class Planet : R|kotlin/Enum<C.Planet>| {
private [ContainingClassKey=Planet] constructor([CorrespondingProperty=<local>/m] m: Double, [CorrespondingProperty=<local>/r] r: Double): R|C.Planet| {
super<R|kotlin/Enum<C.Planet>|>()
local final? enum class Planet : R|kotlin/Enum<<local>/Planet>| {
private [ContainingClassKey=Planet] constructor([CorrespondingProperty=<local>/m] m: Double, [CorrespondingProperty=<local>/r] r: Double): R|<local>/Planet| {
super<R|kotlin/Enum<<local>/Planet>|>()
}
public? final? [IsFromPrimaryConstructor=true] val m: Double = R|<local>/m|
@@ -16,9 +16,9 @@ FILE: enums3.kt
internal final? [IsFromPrimaryConstructor=true] val r: Double = R|<local>/r|
internal [ContainingClassKey=Planet] get(): Double
public final static [ContainingClassKey=Planet] enum entry MERCURY: R|C.Planet| = object : R|C.Planet| {
public final static [ContainingClassKey=Planet] enum entry MERCURY: R|<local>/Planet| = object : R|<local>/Planet| {
private [ContainingClassKey=<anonymous>] constructor(): R|<anonymous>| {
super<R|C.Planet|>(Double(1.0), Double(2.0))
super<R|<local>/Planet|>(Double(1.0), Double(2.0))
}
public? open? override fun sayHello(): R|kotlin/Unit| {
@@ -27,9 +27,9 @@ FILE: enums3.kt
}
public final static [ContainingClassKey=Planet] enum entry VENERA: R|C.Planet| = object : R|C.Planet| {
public final static [ContainingClassKey=Planet] enum entry VENERA: R|<local>/Planet| = object : R|<local>/Planet| {
private [ContainingClassKey=<anonymous>] constructor(): R|<anonymous>| {
super<R|C.Planet|>(Double(3.0), Double(4.0))
super<R|<local>/Planet|>(Double(3.0), Double(4.0))
}
public? open? override fun sayHello(): R|kotlin/Unit| {
@@ -38,9 +38,9 @@ FILE: enums3.kt
}
public final static [ContainingClassKey=Planet] enum entry EARTH: R|C.Planet| = object : R|C.Planet| {
public final static [ContainingClassKey=Planet] enum entry EARTH: R|<local>/Planet| = object : R|<local>/Planet| {
private [ContainingClassKey=<anonymous>] constructor(): R|<anonymous>| {
super<R|C.Planet|>(Double(5.0), Double(6.0))
super<R|<local>/Planet|>(Double(5.0), Double(6.0))
}
public? open? override fun sayHello(): R|kotlin/Unit| {
@@ -55,7 +55,7 @@ FILE: enums3.kt
public? abstract fun sayHello(): R|kotlin/Unit|
local final? companion [ContainingClassKey=Planet] object Companion : R|kotlin/Any| {
private [ContainingClassKey=Companion] constructor(): R|C.Planet.Companion| {
private [ContainingClassKey=Companion] constructor(): R|<local>/Planet.Companion| {
super<R|kotlin/Any|>()
}
@@ -64,14 +64,14 @@ FILE: enums3.kt
}
public final static [ContainingClassKey=Planet] fun values(): R|kotlin/Array<C.Planet>| {
public final static [ContainingClassKey=Planet] fun values(): R|kotlin/Array<<local>/Planet>| {
}
public final static [ContainingClassKey=Planet] fun valueOf(value: R|kotlin/String|): R|C.Planet| {
public final static [ContainingClassKey=Planet] fun valueOf(value: R|kotlin/String|): R|<local>/Planet| {
}
public final static [ContainingClassKey=Planet] val entries: R|kotlin/enums/EnumEntries<C.Planet>|
public get(): R|kotlin/enums/EnumEntries<C.Planet>|
public final static [ContainingClassKey=Planet] val entries: R|kotlin/enums/EnumEntries<<local>/Planet>|
public get(): R|kotlin/enums/EnumEntries<<local>/Planet>|
}
@@ -6,7 +6,7 @@ FILE: initBlockWithDeclarations.kt
init {
local final? class classInInit : R|kotlin/Any| {
public? [ContainingClassKey=classInInit] constructor(): R|X.classInInit| {
public? [ContainingClassKey=classInInit] constructor(): R|<local>/classInInit| {
super<R|kotlin/Any|>()
}
@@ -28,7 +28,7 @@ FILE: initBlockWithDeclarations.kt
init {
local final? class classInInit : R|kotlin/Any| {
public? [ContainingClassKey=classInInit] constructor(): R|<no name provided>.classInInit| {
public? [ContainingClassKey=classInInit] constructor(): R|<local>/classInInit| {
super<R|kotlin/Any|>()
}
@@ -40,7 +40,7 @@ FILE: script.kts
build#(<L> = build@fun <implicit>.<anonymous>(): <implicit> <inline=Unknown> {
version# = String(123)
local final? class A : R|kotlin/Any| {
public? [ContainingClassKey=A] constructor(): R|A| {
public? [ContainingClassKey=A] constructor(): R|<local>/A| {
super<R|kotlin/Any|>()
}
@@ -1,7 +1,7 @@
FILE: locals.kt
public? final? fun withLocals(p: Int): Int {
local final? class Local : R|kotlin/Any| {
public? [ContainingClassKey=Local] constructor([CorrespondingProperty=<local>/pp] pp: Int): R|Local| {
public? [ContainingClassKey=Local] constructor([CorrespondingProperty=<local>/pp] pp: Int): R|<local>/Local| {
super<R|kotlin/Any|>()
}