[Inference] Add ability to approximate local types in AbstractTypeApproximator
This commit is contained in:
committed by
TeamCityServer
parent
73616107b4
commit
3626008ed2
@@ -269,6 +269,11 @@ interface IrTypeSystemContext : TypeSystemContext, TypeSystemCommonSuperTypesCon
|
||||
|
||||
override fun TypeConstructorMarker.isIntegerLiteralTypeConstructor() = false
|
||||
|
||||
override fun TypeConstructorMarker.isLocalType(): Boolean {
|
||||
if (this !is IrClassSymbol) return false
|
||||
return this.owner.classId?.isLocal == true
|
||||
}
|
||||
|
||||
override fun createFlexibleType(lowerBound: SimpleTypeMarker, upperBound: SimpleTypeMarker): KotlinTypeMarker {
|
||||
require(lowerBound.isNothing())
|
||||
require(upperBound is IrType && upperBound.isNullableAny())
|
||||
@@ -516,4 +521,4 @@ fun extractTypeParameters(parent: IrDeclarationParent): List<IrTypeParameter> {
|
||||
}
|
||||
|
||||
|
||||
class IrTypeSystemContextImpl(override val irBuiltIns: IrBuiltIns) : IrTypeSystemContext
|
||||
class IrTypeSystemContextImpl(override val irBuiltIns: IrBuiltIns) : IrTypeSystemContext
|
||||
|
||||
Reference in New Issue
Block a user