[FIR] treat constructors of local classes as local declarations
The main problem: we are trying to lazily resolve local declaration ^KT-58546 ^KT-58490
This commit is contained in:
committed by
Space Team
parent
388634e47d
commit
ae88726fae
+5
-3
@@ -13,6 +13,7 @@ import org.jetbrains.kotlin.analysis.low.level.api.fir.util.getContainingFile
|
||||
import org.jetbrains.kotlin.analysis.low.level.api.fir.util.withFirEntry
|
||||
import org.jetbrains.kotlin.analysis.utils.errors.buildErrorWithAttachment
|
||||
import org.jetbrains.kotlin.analysis.utils.errors.checkWithAttachmentBuilder
|
||||
import org.jetbrains.kotlin.analysis.utils.errors.requireIsInstance
|
||||
import org.jetbrains.kotlin.analysis.utils.errors.unexpectedElementError
|
||||
import org.jetbrains.kotlin.builtins.StandardNames
|
||||
import org.jetbrains.kotlin.descriptors.Visibilities
|
||||
@@ -59,10 +60,11 @@ private fun collectDesignationPath(target: FirElementWithResolveState): List<Fir
|
||||
is FirField,
|
||||
is FirConstructor,
|
||||
is FirEnumEntry,
|
||||
is FirPropertyAccessor -> {
|
||||
require(target is FirCallableDeclaration)
|
||||
is FirPropertyAccessor,
|
||||
-> {
|
||||
requireIsInstance<FirCallableDeclaration>(target)
|
||||
|
||||
if ((target !is FirConstructor && target.symbol.callableId.isLocal) || target.status.visibility == Visibilities.Local) {
|
||||
if (target.symbol.callableId.isLocal || target.status.visibility == Visibilities.Local) {
|
||||
return null
|
||||
}
|
||||
|
||||
|
||||
+4
@@ -125,6 +125,10 @@ private class LLFirTypeTargetResolver(
|
||||
|
||||
override fun doLazyResolveUnderLock(target: FirElementWithResolveState) {
|
||||
when (target) {
|
||||
is FirConstructor -> {
|
||||
// TODO: should be uncommented after KT-58546
|
||||
// error("Shoul be resolved during ${::resolveConstructors.name}")
|
||||
}
|
||||
is FirDanglingModifierList, is FirFileAnnotationsContainer, is FirCallableDeclaration, is FirTypeAlias, is FirScript -> {
|
||||
target.accept(transformer, null)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
fun <T> magic(): T = null!!
|
||||
|
||||
class Q {
|
||||
fun <E, F> f<caret>oo() = {
|
||||
class C<G> {
|
||||
val e: E = magic()
|
||||
val f: F = magic()
|
||||
val g: G = magic()
|
||||
}
|
||||
C<F>()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,294 @@
|
||||
RAW_FIR:
|
||||
FILE: [ResolvedTo(RAW_FIR)] localConstructor.kt
|
||||
[ResolvedTo(RAW_FIR)] annotations container
|
||||
public? final? [ResolvedTo(RAW_FIR)] fun <[ResolvedTo(RAW_FIR)] T> magic(): T { LAZY_BLOCK }
|
||||
public? final? [ResolvedTo(RAW_FIR)] class Q : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Q] constructor(): R|Q| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public? final? [ResolvedTo(RAW_FIR)] fun <[ResolvedTo(RAW_FIR)] E, [ResolvedTo(RAW_FIR)] F> foo(): <implicit> { LAZY_BLOCK }
|
||||
|
||||
}
|
||||
|
||||
IMPORTS:
|
||||
FILE: [ResolvedTo(IMPORTS)] localConstructor.kt
|
||||
[ResolvedTo(RAW_FIR)] annotations container
|
||||
public? final? [ResolvedTo(RAW_FIR)] fun <[ResolvedTo(RAW_FIR)] T> magic(): T { LAZY_BLOCK }
|
||||
public? final? [ResolvedTo(RAW_FIR)] class Q : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Q] constructor(): R|Q| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public? final? [ResolvedTo(RAW_FIR)] fun <[ResolvedTo(RAW_FIR)] E, [ResolvedTo(RAW_FIR)] F> foo(): <implicit> { LAZY_BLOCK }
|
||||
|
||||
}
|
||||
|
||||
COMPILER_REQUIRED_ANNOTATIONS:
|
||||
FILE: [ResolvedTo(IMPORTS)] localConstructor.kt
|
||||
[ResolvedTo(RAW_FIR)] annotations container
|
||||
public? final? [ResolvedTo(RAW_FIR)] fun <[ResolvedTo(RAW_FIR)] T> magic(): T { LAZY_BLOCK }
|
||||
public? final? [ResolvedTo(RAW_FIR)] class Q : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Q] constructor(): R|Q| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public? final? [ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] fun <[ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] E, [ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] F> foo(): <implicit> { LAZY_BLOCK }
|
||||
|
||||
}
|
||||
|
||||
COMPANION_GENERATION:
|
||||
FILE: [ResolvedTo(IMPORTS)] localConstructor.kt
|
||||
[ResolvedTo(RAW_FIR)] annotations container
|
||||
public? final? [ResolvedTo(RAW_FIR)] fun <[ResolvedTo(RAW_FIR)] T> magic(): T { LAZY_BLOCK }
|
||||
public? final? [ResolvedTo(RAW_FIR)] class Q : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Q] constructor(): R|Q| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public? final? [ResolvedTo(COMPANION_GENERATION)] fun <[ResolvedTo(COMPANION_GENERATION)] E, [ResolvedTo(COMPANION_GENERATION)] F> foo(): <implicit> { LAZY_BLOCK }
|
||||
|
||||
}
|
||||
|
||||
SUPER_TYPES:
|
||||
FILE: [ResolvedTo(IMPORTS)] localConstructor.kt
|
||||
[ResolvedTo(RAW_FIR)] annotations container
|
||||
public? final? [ResolvedTo(RAW_FIR)] fun <[ResolvedTo(RAW_FIR)] T> magic(): T { LAZY_BLOCK }
|
||||
public? final? [ResolvedTo(SUPER_TYPES)] class Q : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=Q] constructor(): R|Q| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public? final? [ResolvedTo(SUPER_TYPES)] fun <[ResolvedTo(SUPER_TYPES)] E, [ResolvedTo(SUPER_TYPES)] F> foo(): <implicit> { LAZY_BLOCK }
|
||||
|
||||
}
|
||||
|
||||
TYPES:
|
||||
FILE: [ResolvedTo(IMPORTS)] localConstructor.kt
|
||||
[ResolvedTo(RAW_FIR)] annotations container
|
||||
public? final? [ResolvedTo(RAW_FIR)] fun <[ResolvedTo(RAW_FIR)] T> magic(): T { LAZY_BLOCK }
|
||||
public? final? [ResolvedTo(TYPES)] class Q : R|kotlin/Any| {
|
||||
public? [ResolvedTo(TYPES)] [ContainingClassKey=Q] constructor(): R|Q| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public? final? [ResolvedTo(TYPES)] fun <[ResolvedTo(TYPES)] E, [ResolvedTo(TYPES)] F> foo(): <implicit> { LAZY_BLOCK }
|
||||
|
||||
}
|
||||
|
||||
STATUS:
|
||||
FILE: [ResolvedTo(IMPORTS)] localConstructor.kt
|
||||
[ResolvedTo(RAW_FIR)] annotations container
|
||||
public? final? [ResolvedTo(RAW_FIR)] fun <[ResolvedTo(RAW_FIR)] T> magic(): T { LAZY_BLOCK }
|
||||
public final [ResolvedTo(STATUS)] class Q : R|kotlin/Any| {
|
||||
public [ResolvedTo(STATUS)] [ContainingClassKey=Q] constructor(): R|Q| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public final [ResolvedTo(STATUS)] fun <[ResolvedTo(STATUS)] E, [ResolvedTo(STATUS)] F> foo(): <implicit> { LAZY_BLOCK }
|
||||
|
||||
}
|
||||
|
||||
EXPECT_ACTUAL_MATCHING:
|
||||
FILE: [ResolvedTo(IMPORTS)] localConstructor.kt
|
||||
[ResolvedTo(RAW_FIR)] annotations container
|
||||
public? final? [ResolvedTo(RAW_FIR)] fun <[ResolvedTo(RAW_FIR)] T> magic(): T { LAZY_BLOCK }
|
||||
public final [ResolvedTo(STATUS)] class Q : R|kotlin/Any| {
|
||||
public [ResolvedTo(STATUS)] [ContainingClassKey=Q] constructor(): R|Q| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public final [ResolvedTo(EXPECT_ACTUAL_MATCHING)] fun <[ResolvedTo(EXPECT_ACTUAL_MATCHING)] E, [ResolvedTo(EXPECT_ACTUAL_MATCHING)] F> foo(): <implicit> { LAZY_BLOCK }
|
||||
|
||||
}
|
||||
|
||||
ARGUMENTS_OF_ANNOTATIONS:
|
||||
FILE: [ResolvedTo(IMPORTS)] localConstructor.kt
|
||||
[ResolvedTo(RAW_FIR)] annotations container
|
||||
public? final? [ResolvedTo(RAW_FIR)] fun <[ResolvedTo(RAW_FIR)] T> magic(): T { LAZY_BLOCK }
|
||||
public final [ResolvedTo(STATUS)] class Q : R|kotlin/Any| {
|
||||
public [ResolvedTo(STATUS)] [ContainingClassKey=Q] constructor(): R|Q| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public final [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] fun <[ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] E, [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] F> foo(): <implicit> { LAZY_BLOCK }
|
||||
|
||||
}
|
||||
|
||||
CONTRACTS:
|
||||
FILE: [ResolvedTo(IMPORTS)] localConstructor.kt
|
||||
[ResolvedTo(RAW_FIR)] annotations container
|
||||
public? final? [ResolvedTo(RAW_FIR)] fun <[ResolvedTo(RAW_FIR)] T> magic(): T { LAZY_BLOCK }
|
||||
public final [ResolvedTo(STATUS)] class Q : R|kotlin/Any| {
|
||||
public [ResolvedTo(STATUS)] [ContainingClassKey=Q] constructor(): R|Q| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public final [ResolvedTo(CONTRACTS)] fun <[ResolvedTo(CONTRACTS)] E, [ResolvedTo(CONTRACTS)] F> foo(): <implicit> {
|
||||
^foo [ResolvedTo(RAW_FIR)] fun <implicit>.<anonymous>(): <implicit> <inline=Unknown> {
|
||||
local final? [ResolvedTo(RAW_FIR)] class C<[ResolvedTo(RAW_FIR)] G, [ResolvedTo(CONTRACTS)] E, [ResolvedTo(CONTRACTS)] F> : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=C] constructor<[ResolvedTo(RAW_FIR)] G>(): R|Q.C<G, E, F>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public? final? [ResolvedTo(RAW_FIR)] val e: E = magic#()
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=C] get(): E
|
||||
|
||||
public? final? [ResolvedTo(RAW_FIR)] val f: F = magic#()
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=C] get(): F
|
||||
|
||||
public? final? [ResolvedTo(RAW_FIR)] val g: G = magic#()
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=C] get(): G
|
||||
|
||||
}
|
||||
|
||||
C#<F>()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
IMPLICIT_TYPES_BODY_RESOLVE:
|
||||
FILE: [ResolvedTo(IMPORTS)] localConstructor.kt
|
||||
[ResolvedTo(RAW_FIR)] annotations container
|
||||
public final [ResolvedTo(CONTRACTS)] fun <[ResolvedTo(CONTRACTS)] T> magic(): R|T| {
|
||||
^magic Null(null)!!
|
||||
}
|
||||
public final [ResolvedTo(STATUS)] class Q : R|kotlin/Any| {
|
||||
public [ResolvedTo(STATUS)] [ContainingClassKey=Q] constructor(): R|Q| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public final [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] fun <[ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] E, [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] F> foo(): R|() -> Q.C<F, E, F>| {
|
||||
^foo [ResolvedTo(RAW_FIR)] fun <anonymous>(): R|Q.C<F, E, F>| <inline=Unknown> {
|
||||
local final [ResolvedTo(RAW_FIR)] class C<[ResolvedTo(RAW_FIR)] G, [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] E, [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] F> : R|kotlin/Any| {
|
||||
public [ResolvedTo(RAW_FIR)] [ContainingClassKey=C] constructor<[ResolvedTo(RAW_FIR)] G>(): R|Q.C<G, E, F>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final [ResolvedTo(RAW_FIR)] val e: R|E| = R|/magic|<R|E|>()
|
||||
public [ResolvedTo(RAW_FIR)] [ContainingClassKey=C] get(): R|E|
|
||||
|
||||
public final [ResolvedTo(RAW_FIR)] val f: R|F| = R|/magic|<R|F|>()
|
||||
public [ResolvedTo(RAW_FIR)] [ContainingClassKey=C] get(): R|F|
|
||||
|
||||
public final [ResolvedTo(RAW_FIR)] val g: R|G| = R|/magic|<R|G|>()
|
||||
public [ResolvedTo(RAW_FIR)] [ContainingClassKey=C] get(): R|G|
|
||||
|
||||
}
|
||||
|
||||
^ R|SubstitutionOverride<<local>/Q.C.C>|<R|F|>()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ANNOTATIONS_ARGUMENTS_MAPPING:
|
||||
FILE: [ResolvedTo(IMPORTS)] localConstructor.kt
|
||||
[ResolvedTo(RAW_FIR)] annotations container
|
||||
public final [ResolvedTo(CONTRACTS)] fun <[ResolvedTo(CONTRACTS)] T> magic(): R|T| {
|
||||
^magic Null(null)!!
|
||||
}
|
||||
public final [ResolvedTo(STATUS)] class Q : R|kotlin/Any| {
|
||||
public [ResolvedTo(STATUS)] [ContainingClassKey=Q] constructor(): R|Q| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public final [ResolvedTo(ANNOTATIONS_ARGUMENTS_MAPPING)] fun <[ResolvedTo(ANNOTATIONS_ARGUMENTS_MAPPING)] E, [ResolvedTo(ANNOTATIONS_ARGUMENTS_MAPPING)] F> foo(): R|() -> Q.C<F, E, F>| {
|
||||
^foo [ResolvedTo(RAW_FIR)] fun <anonymous>(): R|Q.C<F, E, F>| <inline=Unknown> {
|
||||
local final [ResolvedTo(RAW_FIR)] class C<[ResolvedTo(RAW_FIR)] G, [ResolvedTo(ANNOTATIONS_ARGUMENTS_MAPPING)] E, [ResolvedTo(ANNOTATIONS_ARGUMENTS_MAPPING)] F> : R|kotlin/Any| {
|
||||
public [ResolvedTo(RAW_FIR)] [ContainingClassKey=C] constructor<[ResolvedTo(RAW_FIR)] G>(): R|Q.C<G, E, F>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final [ResolvedTo(RAW_FIR)] val e: R|E| = R|/magic|<R|E|>()
|
||||
public [ResolvedTo(RAW_FIR)] [ContainingClassKey=C] get(): R|E|
|
||||
|
||||
public final [ResolvedTo(RAW_FIR)] val f: R|F| = R|/magic|<R|F|>()
|
||||
public [ResolvedTo(RAW_FIR)] [ContainingClassKey=C] get(): R|F|
|
||||
|
||||
public final [ResolvedTo(RAW_FIR)] val g: R|G| = R|/magic|<R|G|>()
|
||||
public [ResolvedTo(RAW_FIR)] [ContainingClassKey=C] get(): R|G|
|
||||
|
||||
}
|
||||
|
||||
^ R|SubstitutionOverride<<local>/Q.C.C>|<R|F|>()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BODY_RESOLVE:
|
||||
FILE: [ResolvedTo(IMPORTS)] localConstructor.kt
|
||||
[ResolvedTo(RAW_FIR)] annotations container
|
||||
public final [ResolvedTo(CONTRACTS)] fun <[ResolvedTo(CONTRACTS)] T> magic(): R|T| {
|
||||
^magic Null(null)!!
|
||||
}
|
||||
public final [ResolvedTo(STATUS)] class Q : R|kotlin/Any| {
|
||||
public [ResolvedTo(STATUS)] [ContainingClassKey=Q] constructor(): R|Q| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public final [ResolvedTo(BODY_RESOLVE)] fun <[ResolvedTo(BODY_RESOLVE)] E, [ResolvedTo(BODY_RESOLVE)] F> foo(): R|() -> Q.C<F, E, F>| {
|
||||
^foo [ResolvedTo(BODY_RESOLVE)] fun <anonymous>(): R|Q.C<F, E, F>| <inline=Unknown> {
|
||||
local final [ResolvedTo(BODY_RESOLVE)] class C<[ResolvedTo(BODY_RESOLVE)] G, [ResolvedTo(BODY_RESOLVE)] E, [ResolvedTo(BODY_RESOLVE)] F> : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=C] constructor<[ResolvedTo(BODY_RESOLVE)] G>(): R|Q.C<G, E, F>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final [ResolvedTo(BODY_RESOLVE)] val e: R|E| = R|/magic|<R|E|>()
|
||||
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=C] get(): R|E|
|
||||
|
||||
public final [ResolvedTo(BODY_RESOLVE)] val f: R|F| = R|/magic|<R|F|>()
|
||||
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=C] get(): R|F|
|
||||
|
||||
public final [ResolvedTo(BODY_RESOLVE)] val g: R|G| = R|/magic|<R|G|>()
|
||||
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=C] get(): R|G|
|
||||
|
||||
}
|
||||
|
||||
^ R|SubstitutionOverride<<local>/Q.C.C>|<R|F|>()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
FILE RAW TO BODY:
|
||||
FILE: [ResolvedTo(IMPORTS)] localConstructor.kt
|
||||
[ResolvedTo(BODY_RESOLVE)] annotations container
|
||||
public final [ResolvedTo(BODY_RESOLVE)] fun <[ResolvedTo(BODY_RESOLVE)] T> magic(): R|T| {
|
||||
^magic Null(null)!!
|
||||
}
|
||||
public final [ResolvedTo(BODY_RESOLVE)] class Q : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=Q] constructor(): R|Q| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final [ResolvedTo(BODY_RESOLVE)] fun <[ResolvedTo(BODY_RESOLVE)] E, [ResolvedTo(BODY_RESOLVE)] F> foo(): R|() -> Q.C<F, E, F>| {
|
||||
^foo [ResolvedTo(BODY_RESOLVE)] fun <anonymous>(): R|Q.C<F, E, F>| <inline=Unknown> {
|
||||
local final [ResolvedTo(BODY_RESOLVE)] class C<[ResolvedTo(BODY_RESOLVE)] G, [ResolvedTo(BODY_RESOLVE)] E, [ResolvedTo(BODY_RESOLVE)] F> : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=C] constructor<[ResolvedTo(BODY_RESOLVE)] G>(): R|Q.C<G, E, F>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final [ResolvedTo(BODY_RESOLVE)] val e: R|E| = R|/magic|<R|E|>()
|
||||
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=C] get(): R|E|
|
||||
|
||||
public final [ResolvedTo(BODY_RESOLVE)] val f: R|F| = R|/magic|<R|F|>()
|
||||
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=C] get(): R|F|
|
||||
|
||||
public final [ResolvedTo(BODY_RESOLVE)] val g: R|G| = R|/magic|<R|G|>()
|
||||
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=C] get(): R|G|
|
||||
|
||||
}
|
||||
|
||||
^ R|SubstitutionOverride<<local>/Q.C.C>|<R|F|>()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
class A
|
||||
class A construct<caret>or()
|
||||
@@ -0,0 +1,223 @@
|
||||
RAW_FIR:
|
||||
FILE: [ResolvedTo(RAW_FIR)] redeclaration.kt
|
||||
[ResolvedTo(RAW_FIR)] annotations container
|
||||
public? final? [ResolvedTo(RAW_FIR)] class A : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=A] constructor(): R|A| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
public? final? [ResolvedTo(RAW_FIR)] class A : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=A] constructor(): R|A| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
IMPORTS:
|
||||
FILE: [ResolvedTo(IMPORTS)] redeclaration.kt
|
||||
[ResolvedTo(RAW_FIR)] annotations container
|
||||
public? final? [ResolvedTo(RAW_FIR)] class A : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=A] constructor(): R|A| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
public? final? [ResolvedTo(RAW_FIR)] class A : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=A] constructor(): R|A| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
COMPILER_REQUIRED_ANNOTATIONS:
|
||||
FILE: [ResolvedTo(IMPORTS)] redeclaration.kt
|
||||
[ResolvedTo(RAW_FIR)] annotations container
|
||||
public? final? [ResolvedTo(RAW_FIR)] class A : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=A] constructor(): R|A| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
public? final? [ResolvedTo(RAW_FIR)] class A : R|kotlin/Any| {
|
||||
public? [ResolvedTo(COMPILER_REQUIRED_ANNOTATIONS)] [ContainingClassKey=A] constructor(): R|A| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
COMPANION_GENERATION:
|
||||
FILE: [ResolvedTo(IMPORTS)] redeclaration.kt
|
||||
[ResolvedTo(RAW_FIR)] annotations container
|
||||
public? final? [ResolvedTo(RAW_FIR)] class A : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=A] constructor(): R|A| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
public? final? [ResolvedTo(RAW_FIR)] class A : R|kotlin/Any| {
|
||||
public? [ResolvedTo(COMPANION_GENERATION)] [ContainingClassKey=A] constructor(): R|A| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
SUPER_TYPES:
|
||||
FILE: [ResolvedTo(IMPORTS)] redeclaration.kt
|
||||
[ResolvedTo(RAW_FIR)] annotations container
|
||||
public? final? [ResolvedTo(SUPER_TYPES)] class A : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=A] constructor(): R|A| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
public? final? [ResolvedTo(RAW_FIR)] class A : R|kotlin/Any| {
|
||||
public? [ResolvedTo(SUPER_TYPES)] [ContainingClassKey=A] constructor(): R|A| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
TYPES:
|
||||
FILE: [ResolvedTo(IMPORTS)] redeclaration.kt
|
||||
[ResolvedTo(RAW_FIR)] annotations container
|
||||
public? final? [ResolvedTo(TYPES)] class A : R|kotlin/Any| {
|
||||
public? [ResolvedTo(TYPES)] [ContainingClassKey=A] constructor(): R|A| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
public? final? [ResolvedTo(RAW_FIR)] class A : R|kotlin/Any| {
|
||||
public? [ResolvedTo(TYPES)] [ContainingClassKey=A] constructor(): R|A| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
STATUS:
|
||||
FILE: [ResolvedTo(IMPORTS)] redeclaration.kt
|
||||
[ResolvedTo(RAW_FIR)] annotations container
|
||||
public final [ResolvedTo(STATUS)] class A : R|kotlin/Any| {
|
||||
public [ResolvedTo(STATUS)] [ContainingClassKey=A] constructor(): R|A| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
public? final? [ResolvedTo(RAW_FIR)] class A : R|kotlin/Any| {
|
||||
public [ResolvedTo(STATUS)] [ContainingClassKey=A] constructor(): R|A| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
EXPECT_ACTUAL_MATCHING:
|
||||
FILE: [ResolvedTo(IMPORTS)] redeclaration.kt
|
||||
[ResolvedTo(RAW_FIR)] annotations container
|
||||
public final [ResolvedTo(STATUS)] class A : R|kotlin/Any| {
|
||||
public [ResolvedTo(STATUS)] [ContainingClassKey=A] constructor(): R|A| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
public? final? [ResolvedTo(RAW_FIR)] class A : R|kotlin/Any| {
|
||||
public [ResolvedTo(EXPECT_ACTUAL_MATCHING)] [ContainingClassKey=A] constructor(): R|A| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ARGUMENTS_OF_ANNOTATIONS:
|
||||
FILE: [ResolvedTo(IMPORTS)] redeclaration.kt
|
||||
[ResolvedTo(RAW_FIR)] annotations container
|
||||
public final [ResolvedTo(STATUS)] class A : R|kotlin/Any| {
|
||||
public [ResolvedTo(STATUS)] [ContainingClassKey=A] constructor(): R|A| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
public? final? [ResolvedTo(RAW_FIR)] class A : R|kotlin/Any| {
|
||||
public [ResolvedTo(ARGUMENTS_OF_ANNOTATIONS)] [ContainingClassKey=A] constructor(): R|A| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
CONTRACTS:
|
||||
FILE: [ResolvedTo(IMPORTS)] redeclaration.kt
|
||||
[ResolvedTo(RAW_FIR)] annotations container
|
||||
public final [ResolvedTo(STATUS)] class A : R|kotlin/Any| {
|
||||
public [ResolvedTo(STATUS)] [ContainingClassKey=A] constructor(): R|A| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
public? final? [ResolvedTo(RAW_FIR)] class A : R|kotlin/Any| {
|
||||
public [ResolvedTo(CONTRACTS)] [ContainingClassKey=A] constructor(): R|A| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
IMPLICIT_TYPES_BODY_RESOLVE:
|
||||
FILE: [ResolvedTo(IMPORTS)] redeclaration.kt
|
||||
[ResolvedTo(RAW_FIR)] annotations container
|
||||
public final [ResolvedTo(STATUS)] class A : R|kotlin/Any| {
|
||||
public [ResolvedTo(STATUS)] [ContainingClassKey=A] constructor(): R|A| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
public? final? [ResolvedTo(RAW_FIR)] class A : R|kotlin/Any| {
|
||||
public [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] [ContainingClassKey=A] constructor(): R|A| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ANNOTATIONS_ARGUMENTS_MAPPING:
|
||||
FILE: [ResolvedTo(IMPORTS)] redeclaration.kt
|
||||
[ResolvedTo(RAW_FIR)] annotations container
|
||||
public final [ResolvedTo(STATUS)] class A : R|kotlin/Any| {
|
||||
public [ResolvedTo(STATUS)] [ContainingClassKey=A] constructor(): R|A| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
public? final? [ResolvedTo(RAW_FIR)] class A : R|kotlin/Any| {
|
||||
public [ResolvedTo(ANNOTATIONS_ARGUMENTS_MAPPING)] [ContainingClassKey=A] constructor(): R|A| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BODY_RESOLVE:
|
||||
FILE: [ResolvedTo(IMPORTS)] redeclaration.kt
|
||||
[ResolvedTo(RAW_FIR)] annotations container
|
||||
public final [ResolvedTo(STATUS)] class A : R|kotlin/Any| {
|
||||
public [ResolvedTo(STATUS)] [ContainingClassKey=A] constructor(): R|A| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
public? final? [ResolvedTo(RAW_FIR)] class A : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=A] constructor(): R|A| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
FILE RAW TO BODY:
|
||||
FILE: [ResolvedTo(IMPORTS)] redeclaration.kt
|
||||
[ResolvedTo(BODY_RESOLVE)] annotations container
|
||||
public final [ResolvedTo(BODY_RESOLVE)] class A : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=A] constructor(): R|A| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
public final [ResolvedTo(BODY_RESOLVE)] class A : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=A] constructor(): R|A| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
+12
@@ -198,6 +198,12 @@ public class FirOutOfContentRootLazyDeclarationResolveTestGenerated extends Abst
|
||||
runTest("analysis/low-level-api-fir/testdata/lazyResolve/lazyProperty.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("localConstructor.kt")
|
||||
public void testLocalConstructor() throws Exception {
|
||||
runTest("analysis/low-level-api-fir/testdata/lazyResolve/localConstructor.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("localFunctionInsideSuperEntryCall.kt")
|
||||
public void testLocalFunctionInsideSuperEntryCall() throws Exception {
|
||||
@@ -276,6 +282,12 @@ public class FirOutOfContentRootLazyDeclarationResolveTestGenerated extends Abst
|
||||
runTest("analysis/low-level-api-fir/testdata/lazyResolve/propertyWithInitializer.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("redeclaration.kt")
|
||||
public void testRedeclaration() throws Exception {
|
||||
runTest("analysis/low-level-api-fir/testdata/lazyResolve/redeclaration.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("resolveSuperTypeFromLocalClass.kt")
|
||||
public void testResolveSuperTypeFromLocalClass() throws Exception {
|
||||
|
||||
+12
@@ -198,6 +198,12 @@ public class FirSourceLazyDeclarationResolveTestGenerated extends AbstractFirSou
|
||||
runTest("analysis/low-level-api-fir/testdata/lazyResolve/lazyProperty.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("localConstructor.kt")
|
||||
public void testLocalConstructor() throws Exception {
|
||||
runTest("analysis/low-level-api-fir/testdata/lazyResolve/localConstructor.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("localFunctionInsideSuperEntryCall.kt")
|
||||
public void testLocalFunctionInsideSuperEntryCall() throws Exception {
|
||||
@@ -276,6 +282,12 @@ public class FirSourceLazyDeclarationResolveTestGenerated extends AbstractFirSou
|
||||
runTest("analysis/low-level-api-fir/testdata/lazyResolve/propertyWithInitializer.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("redeclaration.kt")
|
||||
public void testRedeclaration() throws Exception {
|
||||
runTest("analysis/low-level-api-fir/testdata/lazyResolve/redeclaration.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("resolveSuperTypeFromLocalClass.kt")
|
||||
public void testResolveSuperTypeFromLocalClass() throws Exception {
|
||||
|
||||
+1
-1
@@ -7,5 +7,5 @@ FILE: localConstructor.kt
|
||||
|
||||
}
|
||||
|
||||
lval l: R|Local| = R|/Local.Local|()
|
||||
lval l: R|Local| = R|<local>/Local.Local|()
|
||||
}
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ FILE: localInnerClass.kt
|
||||
}
|
||||
|
||||
public final fun foo(): R|Foo| {
|
||||
^foo this@R|/<anonymous>|.R|/<anonymous>.Derived.Derived|(Int(42))
|
||||
^foo this@R|/<anonymous>|.R|<local>/<anonymous>.Derived.Derived|(Int(42))
|
||||
}
|
||||
|
||||
local final inner class Derived : R|Foo| {
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@ FILE: localScopes.kt
|
||||
|
||||
}
|
||||
|
||||
lval base: R|BaseLocal| = R|/BaseLocal.BaseLocal|()
|
||||
lval base: R|BaseLocal| = R|<local>/BaseLocal.BaseLocal|()
|
||||
R|<local>/base|.R|<local>/baz|()
|
||||
R|<local>/base|.R|/Bar.foo|()
|
||||
lval anonymous: R|<anonymous>| = object : R|Bar| {
|
||||
@@ -44,7 +44,7 @@ FILE: localScopes.kt
|
||||
|
||||
}
|
||||
|
||||
lval derived: R|DerivedLocal| = R|/DerivedLocal.DerivedLocal|()
|
||||
lval derived: R|DerivedLocal| = R|<local>/DerivedLocal.DerivedLocal|()
|
||||
R|<local>/derived|.R|<local>/gau|()
|
||||
R|<local>/derived|.R|<local>/baz|()
|
||||
R|<local>/derived|.R|/Bar.foo|()
|
||||
|
||||
+3
-3
@@ -72,7 +72,7 @@ FILE: first.kt
|
||||
|
||||
public final fun baz(): R|kotlin/Unit| {
|
||||
this@R|/Local|.R|<local>/bar|()
|
||||
this@R|/Local|.R|/Local.Inner.Inner|()
|
||||
this@R|/Local|.R|<local>/Local.Inner.Inner|()
|
||||
}
|
||||
|
||||
local final inner class Inner : R|kotlin/Any| {
|
||||
@@ -88,8 +88,8 @@ FILE: first.kt
|
||||
|
||||
}
|
||||
|
||||
R|/Local.Local|().R|<local>/baz|()
|
||||
R|/Local.Local|().R|<local>/bar<HIDDEN: <local>/bar is invisible>#|()
|
||||
R|<local>/Local.Local|().R|<local>/baz|()
|
||||
R|<local>/Local.Local|().R|<local>/bar<HIDDEN: <local>/bar is invisible>#|()
|
||||
}
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
R|/foo|()
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ FILE: RedundantVisibilityModifierChecker.kt
|
||||
|
||||
}
|
||||
|
||||
R|/LocalClass.LocalClass|().R|<local>/foo| = Int(1)
|
||||
R|<local>/LocalClass.LocalClass|().R|<local>/foo| = Int(1)
|
||||
}
|
||||
internal final inline fun internal(): R|kotlin/Unit| {
|
||||
R|/f|()
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ FILE: RedundantVisibilityModifierCheckerWithExplicitApiMode.kt
|
||||
|
||||
}
|
||||
|
||||
R|/LocalClass.LocalClass|().R|<local>/foo| = Int(1)
|
||||
R|<local>/LocalClass.LocalClass|().R|<local>/foo| = Int(1)
|
||||
}
|
||||
public final fun f2(): R|kotlin/Unit| {
|
||||
R|/f1|()
|
||||
|
||||
+1
-1
@@ -15,5 +15,5 @@ FILE: localVariableInSecondaryConstructor.kt
|
||||
|
||||
}
|
||||
|
||||
R|/LocalClass.LocalClass|().R|<local>/arg|
|
||||
R|<local>/LocalClass.LocalClass|().R|<local>/arg|
|
||||
}
|
||||
|
||||
+3
-3
@@ -27,7 +27,7 @@ FILE: implicitInLocalClasses.kt
|
||||
|
||||
}
|
||||
|
||||
lval a: R|A| = R|/A.A|()
|
||||
lval a: R|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|)
|
||||
@@ -45,7 +45,7 @@ FILE: implicitInLocalClasses.kt
|
||||
^bar CMP(>, this@R|/B|.R|kotlin/Any.hashCode|().R|kotlin/Int.plus|(R|<local>/y|).R|kotlin/Int.compareTo|(Int(0)))
|
||||
}
|
||||
|
||||
public final val inner: R|B.Inner| = this@R|/B|.R|/B.Inner.Inner|()
|
||||
public final val inner: R|B.Inner| = this@R|/B|.R|<local>/B.Inner.Inner|()
|
||||
public get(): R|B.Inner|
|
||||
|
||||
local final inner class Inner : R|kotlin/Any| {
|
||||
@@ -67,7 +67,7 @@ FILE: implicitInLocalClasses.kt
|
||||
|
||||
}
|
||||
|
||||
lval b: R|B| = R|/B.B|()
|
||||
lval b: R|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|)
|
||||
|
||||
@@ -44,14 +44,14 @@ FILE: objectInnerClass.kt
|
||||
}
|
||||
|
||||
public final fun caseForBase(): R|kotlin/Unit| {
|
||||
lval base: R|<anonymous>.Base| = this@R|/<anonymous>|.R|/<anonymous>.Base.Base|(R|/B.B|())
|
||||
lval base: R|<anonymous>.Base| = this@R|/<anonymous>|.R|<local>/<anonymous>.Base.Base|(R|/B.B|())
|
||||
R|<local>/base|.R|<local>/baseFun|()
|
||||
R|<local>/base|.R|<local>/property|
|
||||
(this@R|/<anonymous>|, R|<local>/base|).R|/<anonymous>.hoo|()
|
||||
}
|
||||
|
||||
public final fun caseForChild(): R|kotlin/Unit| {
|
||||
lval child: R|<anonymous>.Child| = this@R|/<anonymous>|.R|/<anonymous>.Child.Child|(R|/B.B|())
|
||||
lval child: R|<anonymous>.Child| = this@R|/<anonymous>|.R|<local>/<anonymous>.Child.Child|(R|/B.B|())
|
||||
R|<local>/child|.R|<local>/baseFun|()
|
||||
R|<local>/child|.R|<local>/property|
|
||||
R|<local>/child|.R|<local>/foo|()
|
||||
@@ -169,14 +169,14 @@ FILE: objectInnerClass.kt
|
||||
}
|
||||
|
||||
public final fun caseForBase(): R|kotlin/Unit| {
|
||||
lval base: R|Case3.<anonymous>.Base| = this@R|/<anonymous>|.R|/Case3.<anonymous>.Base.Base|(R|/B.B|())
|
||||
lval base: R|Case3.<anonymous>.Base| = this@R|/<anonymous>|.R|<local>/Case3.<anonymous>.Base.Base|(R|/B.B|())
|
||||
R|<local>/base|.R|<local>/baseFun|()
|
||||
R|<local>/base|.R|<local>/property|
|
||||
(this@R|/<anonymous>|, R|<local>/base|).R|/<anonymous>.hoo|()
|
||||
}
|
||||
|
||||
public final fun caseForChild(): R|kotlin/Unit| {
|
||||
lval child: R|Case3.<anonymous>.Child| = this@R|/<anonymous>|.R|/Case3.<anonymous>.Child.Child|(R|/B.B|())
|
||||
lval child: R|Case3.<anonymous>.Child| = this@R|/<anonymous>|.R|<local>/Case3.<anonymous>.Child.Child|(R|/B.B|())
|
||||
R|<local>/child|.R|<local>/baseFun|()
|
||||
R|<local>/child|.R|<local>/property|
|
||||
R|<local>/child|.R|<local>/foo|()
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ FILE: test.kt
|
||||
}
|
||||
|
||||
public final fun bar(): R|kotlin/String| {
|
||||
^bar this@R|/<anonymous>|.R|/<anonymous>.S.S|().R|<local>/foo|()
|
||||
^bar this@R|/<anonymous>|.R|<local>/<anonymous>.S.S|().R|<local>/foo|()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-2
@@ -15,8 +15,8 @@ digraph inLocalClass_kt {
|
||||
3 [label="Exit block"];
|
||||
}
|
||||
4 [label="Local class declaration"];
|
||||
5 [label="Function call: R|/LocalClass.LocalClass|()" style="filled" fillcolor=yellow];
|
||||
6 [label="Function call: R|/LocalClass.LocalClass|().R|<local>/run|()" style="filled" fillcolor=yellow];
|
||||
5 [label="Function call: R|<local>/LocalClass.LocalClass|()" style="filled" fillcolor=yellow];
|
||||
6 [label="Function call: R|<local>/LocalClass.LocalClass|().R|<local>/run|()" style="filled" fillcolor=yellow];
|
||||
7 [label="Function call: R|<local>/e|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()" style="filled" fillcolor=yellow];
|
||||
8 [label="Exit block"];
|
||||
}
|
||||
|
||||
+1
-1
@@ -42,6 +42,6 @@ FILE: inLocalClass.kt
|
||||
|
||||
}
|
||||
|
||||
R|/LocalClass.LocalClass|().R|<local>/run|()
|
||||
R|<local>/LocalClass.LocalClass|().R|<local>/run|()
|
||||
R|<local>/e|.R|SubstitutionOverride<kotlin/Function0.invoke: R|kotlin/Unit|>|()
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ FILE: problems.kt
|
||||
|
||||
}
|
||||
|
||||
R|/Local.Local|()
|
||||
R|<local>/Local.Local|()
|
||||
}
|
||||
public final val R|kotlin/Any|.bar: R|kotlin/String|
|
||||
public get(): R|kotlin/String| {
|
||||
|
||||
+13
-3
@@ -151,9 +151,19 @@ abstract class BaseFirBuilder<T>(val baseSession: FirSession, val context: Conte
|
||||
return dispatchReceivers.getOrNull(dispatchReceivers.lastIndex - 1)
|
||||
}
|
||||
|
||||
fun callableIdForClassConstructor() =
|
||||
if (context.className == FqName.ROOT) CallableId(context.packageFqName, Name.special("<anonymous-init>"))
|
||||
else CallableId(context.packageFqName, context.className, context.className.shortName())
|
||||
fun callableIdForClassConstructor(): CallableId {
|
||||
val packageName = if (context.inLocalContext) {
|
||||
CallableId.PACKAGE_FQ_NAME_FOR_LOCAL
|
||||
} else {
|
||||
context.packageFqName
|
||||
}
|
||||
|
||||
return if (context.className == FqName.ROOT) {
|
||||
CallableId(packageName, Name.special("<anonymous-init>"))
|
||||
} else {
|
||||
CallableId(packageName, context.className, context.className.shortName())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**** Function utils ****/
|
||||
|
||||
@@ -13,8 +13,8 @@ data class CallableId(
|
||||
// Currently, it's only used for debug info
|
||||
private val pathToLocal: FqName? = null
|
||||
) {
|
||||
private companion object {
|
||||
val LOCAL_NAME = SpecialNames.LOCAL
|
||||
companion object {
|
||||
private val LOCAL_NAME = SpecialNames.LOCAL
|
||||
val PACKAGE_FQ_NAME_FOR_LOCAL = FqName.topLevel(LOCAL_NAME)
|
||||
}
|
||||
|
||||
@@ -23,13 +23,12 @@ data class CallableId(
|
||||
* Otherwise, returns `false`
|
||||
*/
|
||||
val isLocal: Boolean
|
||||
get() = packageName == PACKAGE_FQ_NAME_FOR_LOCAL
|
||||
|| classId?.isLocal == true
|
||||
get() = packageName == PACKAGE_FQ_NAME_FOR_LOCAL || classId?.isLocal == true
|
||||
|
||||
var classId: ClassId? = null
|
||||
get() {
|
||||
if (field == null && className != null) {
|
||||
field = ClassId(packageName, className, false)
|
||||
field = ClassId(packageName, className, packageName == PACKAGE_FQ_NAME_FOR_LOCAL)
|
||||
}
|
||||
return field
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user