Files
kotlin-fork/compiler/fir/analysis-tests/testData/resolve/localClasses/implicitInLocalClasses.fir.txt
T
Nikolay Lunyak f9c6af4d2a [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
2023-08-18 13:31:04 +00:00

76 lines
2.9 KiB
Plaintext
Vendored

FILE: implicitInLocalClasses.kt
public final fun useBoolean(b: R|kotlin/Boolean|): R|kotlin/Unit| {
}
public final fun main(): R|kotlin/Unit| {
local final class A : R|kotlin/Any| {
public constructor(): R|<local>/A| {
super<R|kotlin/Any|>()
}
public final fun foo(x: R|kotlin/Int|): R|kotlin/Boolean| {
^foo this@R|<local>/A|.R|<local>/bar|(R|<local>/x|)
}
public final fun bar(y: R|kotlin/Int|): R|kotlin/Boolean| {
^bar CMP(>, this@R|<local>/A|.R|kotlin/Any.hashCode|().R|kotlin/Int.plus|(R|<local>/y|).R|kotlin/Int.compareTo|(Int(0)))
}
public final val w: R|kotlin/Boolean|
public get(): R|kotlin/Boolean| {
^ this@R|<local>/A|.R|<local>/z|
}
public final val z: R|kotlin/Boolean|
public get(): R|kotlin/Boolean| {
^ ==(this@R|<local>/A|.R|kotlin/Any.hashCode|(), Int(0))
}
}
lval a: R|<local>/A| = R|<local>/A.A|()
R|/useBoolean|(R|<local>/a|.R|<local>/foo|(Int(1)))
R|/useBoolean|(R|<local>/a|.R|<local>/bar|(Int(1)))
R|/useBoolean|(R|<local>/a|.R|<local>/w|)
R|/useBoolean|(R|<local>/a|.R|<local>/z|)
local final class B : R|kotlin/Any| {
public constructor(): R|<local>/B| {
super<R|kotlin/Any|>()
}
public final fun foo(x: R|kotlin/Int|): R|kotlin/Boolean| {
^foo this@R|<local>/B|.R|<local>/inner|.R|<local>/w|
}
public final fun bar(y: R|kotlin/Int|): R|kotlin/Boolean| {
^bar CMP(>, this@R|<local>/B|.R|kotlin/Any.hashCode|().R|kotlin/Int.plus|(R|<local>/y|).R|kotlin/Int.compareTo|(Int(0)))
}
public final val inner: R|<local>/B.Inner| = this@R|<local>/B|.R|<local>/B.Inner.Inner|()
public get(): R|<local>/B.Inner|
local final inner class Inner : R|kotlin/Any| {
public <local>/B.constructor(): R|<local>/B.Inner| {
super<R|kotlin/Any|>()
}
public final val w: R|kotlin/Boolean|
public get(): R|kotlin/Boolean| {
^ this@R|<local>/B.Inner|.R|<local>/z|
}
public final val z: R|kotlin/Boolean|
public get(): R|kotlin/Boolean| {
^ this@R|<local>/B|.R|<local>/bar|(Int(1))
}
}
}
lval b: R|<local>/B| = R|<local>/B.B|()
R|/useBoolean|(R|<local>/b|.R|<local>/foo|(Int(1)))
R|/useBoolean|(R|<local>/b|.R|<local>/bar|(Int(1)))
R|/useBoolean|(R|<local>/b|.R|<local>/inner|.R|<local>/w|)
R|/useBoolean|(R|<local>/b|.R|<local>/inner|.R|<local>/z|)
}