Files
kotlin-fork/idea/idea-completion/testData/basic/common/primitiveCompletion/localClassConstructor.kt
T
Roman Golyshev 28d8d2d903 FIR IDE: Search for the first non-local declaration in EnclosingDeclarationContext::detect
Local declarations do not have a stable `ClassId`, which is used in
`declarationUtils.collectDesignation`. Local classes will always have
`outerClassId.isLocal = true`, even when it is not true (see
`org.jetbrains.kotlin.fir.builder.Context.currentClassId` for why this
happens)
2021-04-13 11:40:20 +00:00

20 lines
347 B
Kotlin
Vendored

package test
class T
fun topLevelFun(param: T) {
val firstVariable = T()
class LocalClass(constructorParam: T) {
val localClassField = constructorParam
init {
<caret>
}
}
val secondVariable = T()
}
// EXIST: firstVariable, param, constructorParam, localClassField
// ABSENT: secondVariable