Use 'symbol' instead of 'classId' in FirResolvedQualifier
This commit solves problem with resolved qualifier of local class #KT-36758 Fixed
This commit is contained in:
-1
@@ -6,7 +6,6 @@
|
||||
package org.jetbrains.kotlin.fir.tree.generator
|
||||
|
||||
import org.jetbrains.kotlin.fir.tree.generator.context.AbstractBuilderConfigurator
|
||||
import org.jetbrains.kotlin.fir.tree.generator.context.AbstractFirTreeImplementationConfigurator
|
||||
import org.jetbrains.kotlin.fir.tree.generator.model.Element
|
||||
import org.jetbrains.kotlin.fir.tree.generator.model.Field
|
||||
import org.jetbrains.kotlin.fir.tree.generator.model.Implementation
|
||||
|
||||
-2
@@ -6,10 +6,8 @@
|
||||
package org.jetbrains.kotlin.fir.tree.generator
|
||||
|
||||
import org.jetbrains.kotlin.fir.tree.generator.context.AbstractFirTreeImplementationConfigurator
|
||||
import org.jetbrains.kotlin.fir.tree.generator.model.Implementation
|
||||
import org.jetbrains.kotlin.fir.tree.generator.model.Implementation.Kind.Object
|
||||
import org.jetbrains.kotlin.fir.tree.generator.model.Implementation.Kind.OpenClass
|
||||
import org.jetbrains.kotlin.fir.tree.generator.util.traverseParents
|
||||
|
||||
object ImplementationConfigurator : AbstractFirTreeImplementationConfigurator() {
|
||||
fun configureImplementations() {
|
||||
|
||||
+1
@@ -431,6 +431,7 @@ object NodeConfigurator : AbstractFieldConfigurator<FirTreeBuilder>(FirTreeBuild
|
||||
+field("packageFqName", fqNameType)
|
||||
+field("relativeClassFqName", fqNameType, nullable = true)
|
||||
+field("classId", classIdType, nullable = true)
|
||||
+field("symbol", classLikeSymbolType, nullable = true)
|
||||
+booleanField("safe", withReplace = true)
|
||||
+typeArguments.withTransform()
|
||||
}
|
||||
|
||||
@@ -58,6 +58,7 @@ val abstractFirBasedSymbolType = type("fir.symbols", "AbstractFirBasedSymbol")
|
||||
val backingFieldSymbolType = type("fir.symbols.impl", "FirBackingFieldSymbol")
|
||||
val delegateFieldSymbolType = type("fir.symbols.impl", "FirDelegateFieldSymbol")
|
||||
val classSymbolType = type("fir.symbols.impl", "FirClassSymbol")
|
||||
val classLikeSymbolType = type("fir.symbols.impl", "FirClassLikeSymbol<*>")
|
||||
val typeParameterSymbolType = type("fir.symbols.impl", "FirTypeParameterSymbol")
|
||||
|
||||
val firScopeProviderType = type("fir.scopes", "FirScopeProvider")
|
||||
|
||||
+4
-1
@@ -98,7 +98,10 @@ fun SmartPrinter.printImplementation(implementation: Implementation) {
|
||||
}
|
||||
|
||||
element.allFields.filter { it.type.contains("Symbol") && it !is FieldList }
|
||||
.takeIf { it.isNotEmpty() && !isInterface && !isAbstract && !element.type.contains("Reference") }
|
||||
.takeIf {
|
||||
it.isNotEmpty() && !isInterface && !isAbstract &&
|
||||
!element.type.contains("Reference") && !element.type.contains("ResolvedQualifier")
|
||||
}
|
||||
?.let { symbolFields ->
|
||||
println("init {")
|
||||
for (symbolField in symbolFields) {
|
||||
|
||||
Reference in New Issue
Block a user