FIR renderer: extract separate ConeTypeRenderer
This commit is contained in:
@@ -519,7 +519,7 @@ interface ConeInferenceContext : TypeSystemInferenceExtensionContext, ConeTypeCo
|
||||
override fun KotlinTypeMarker.getFunctionalTypeFromSupertypes(): KotlinTypeMarker {
|
||||
require(this is ConeKotlinType)
|
||||
assert(this.isBuiltinFunctionalTypeOrSubtype()) {
|
||||
"Not a function type or subtype: ${this.render()}"
|
||||
"Not a function type or subtype: ${this.renderForDebugging()}"
|
||||
}
|
||||
|
||||
return fullyExpandedType(session).let {
|
||||
|
||||
@@ -122,7 +122,7 @@ fun <T : ConeKotlinType> T.withArguments(arguments: Array<out ConeTypeProjection
|
||||
is ConeErrorType -> this
|
||||
is ConeClassLikeTypeImpl -> ConeClassLikeTypeImpl(lookupTag, arguments, nullability.isNullable) as T
|
||||
is ConeDefinitelyNotNullType -> ConeDefinitelyNotNullType(original.withArguments(arguments)) as T
|
||||
else -> error("Not supported: $this: ${this.render()}")
|
||||
else -> error("Not supported: $this: ${this.renderForDebugging()}")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ fun <T : ConeKotlinType> T.withAttributes(attributes: ConeAttributes): T {
|
||||
// Attributes for stub types are not supported, and it's not obvious if it should
|
||||
is ConeStubType -> this
|
||||
is ConeIntegerLiteralType -> this
|
||||
else -> error("Not supported: $this: ${this.render()}")
|
||||
else -> error("Not supported: $this: ${this.renderForDebugging()}")
|
||||
} as T
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user