Type Approximation: add separate flag to control approx. anonymous type
This extra flexibility is useful for IDE where we always want to approximate anonymous types but may not want to approximate other local types
This commit is contained in:
@@ -24,6 +24,7 @@ import org.jetbrains.kotlin.fir.symbols.ensureResolved
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.*
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.name.FqNameUnsafe
|
||||
import org.jetbrains.kotlin.name.SpecialNames
|
||||
import org.jetbrains.kotlin.name.StandardClassIds
|
||||
import org.jetbrains.kotlin.types.TypeCheckerState
|
||||
import org.jetbrains.kotlin.types.TypeCheckerState.SupertypesPolicy.DoCustomTransform
|
||||
@@ -47,6 +48,11 @@ interface ConeTypeContext : TypeSystemContext, TypeSystemOptimizationContext, Ty
|
||||
return classId.isLocal
|
||||
}
|
||||
|
||||
override fun TypeConstructorMarker.isAnonymous(): Boolean {
|
||||
if (this !is ConeClassLikeLookupTag) return false
|
||||
return name == SpecialNames.ANONYMOUS
|
||||
}
|
||||
|
||||
override val TypeVariableTypeConstructorMarker.typeParameter: TypeParameterMarker?
|
||||
get() {
|
||||
require(this is ConeTypeVariableTypeConstructor)
|
||||
|
||||
Reference in New Issue
Block a user