KT-64186 [LL] Correctly handle anonymous objects' headers in ContextCollector
This bug spilled into reference shortener, and then to "redundant qualifier inspection" and code completion from there; it caused KTIJ-26024 to reproduce again (but only for anonymous objects) ^KT-64186 Fixed
This commit is contained in:
committed by
Space Team
parent
2eb1e65bbf
commit
78f492394c
+9
@@ -0,0 +1,9 @@
|
||||
package test
|
||||
|
||||
open class Base(param: Nested) {
|
||||
class Nested
|
||||
}
|
||||
|
||||
val property: Base.Nested = Base.Nested()
|
||||
|
||||
val child = object : Base(<expr>property</expr>) {}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
Tower Data Context:
|
||||
Element 0
|
||||
Scope: FirDefaultStarImportingScope
|
||||
Element 1
|
||||
Scope: FirExplicitStarImportingScope
|
||||
Element 2
|
||||
Scope: FirDefaultSimpleImportingScope
|
||||
Element 3
|
||||
Scope: FirDefaultSimpleImportingScope
|
||||
Element 4
|
||||
Scope: FirPackageMemberScope
|
||||
Element 5
|
||||
Scope: FirExplicitSimpleImportingScope
|
||||
Element 6
|
||||
Scope: FirNestedClassifierScopeWithSubstitution
|
||||
Classifiers:
|
||||
FirRegularClassSymbol public final class Nested : R|kotlin/Any|
|
||||
Static scope owner symbol: FirRegularClassSymbol public open class Base : R|kotlin/Any|
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] superTypeCallArgumentsExpression_objectLiteral.kt
|
||||
public open [ResolvedTo(STATUS)] class Base : R|kotlin/Any| {
|
||||
public [ResolvedTo(STATUS)] constructor([ResolvedTo(STATUS)] param: R|test/Base.Nested|): R|test/Base| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public final [ResolvedTo(STATUS)] class Nested : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] constructor(): R|test/Base.Nested| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public final [ResolvedTo(CONTRACTS)] val property: R|test/Base.Nested| = Base#.Nested#()
|
||||
public [ResolvedTo(CONTRACTS)] get(): R|test/Base.Nested|
|
||||
public final [ResolvedTo(BODY_RESOLVE)] val child: R|test/Base| = object : R|test/Base| {
|
||||
private [ResolvedTo(BODY_RESOLVE)] constructor(): R|test/<anonymous>| {
|
||||
super<R|test/Base|>(R|test/property|)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public [ResolvedTo(BODY_RESOLVE)] get(): R|test/Base|
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package test
|
||||
|
||||
open class Base {
|
||||
class Nested
|
||||
}
|
||||
|
||||
val child = object : <expr>Base</expr>() {}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
Tower Data Context:
|
||||
Element 0
|
||||
Scope: FirDefaultStarImportingScope
|
||||
Element 1
|
||||
Scope: FirExplicitStarImportingScope
|
||||
Element 2
|
||||
Scope: FirDefaultSimpleImportingScope
|
||||
Element 3
|
||||
Scope: FirDefaultSimpleImportingScope
|
||||
Element 4
|
||||
Scope: FirPackageMemberScope
|
||||
Element 5
|
||||
Scope: FirExplicitSimpleImportingScope
|
||||
|
||||
FILE: [ResolvedTo(IMPORTS)] superTypeCallee_objectLiteral.kt
|
||||
public open [ResolvedTo(STATUS)] class Base : R|kotlin/Any| {
|
||||
public [ResolvedTo(STATUS)] constructor(): R|test/Base| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
public? final? [ResolvedTo(RAW_FIR)] class Nested : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] constructor(): R|test/Base.Nested| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public final [ResolvedTo(BODY_RESOLVE)] val child: R|test/Base| = object : R|test/Base| {
|
||||
private [ResolvedTo(BODY_RESOLVE)] constructor(): R|test/<anonymous>| {
|
||||
super<R|test/Base|>()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public [ResolvedTo(BODY_RESOLVE)] get(): R|test/Base|
|
||||
Reference in New Issue
Block a user