[FIR] Add ability to safe proper ConeKotlinType in FirErrorTypeRef
This is needed for cases when some type ref is resolved to proper type but has some diagnostic (e.g. this type is invisible)
This commit is contained in:
committed by
teamcityserver
parent
08b0e17d47
commit
f2c319c4ae
@@ -117,6 +117,7 @@ fun FirTypeRef.resolvedTypeFromPrototype(
|
||||
return if (type is ConeKotlinErrorType) {
|
||||
buildErrorTypeRef {
|
||||
source = this@resolvedTypeFromPrototype.source
|
||||
this.type = type
|
||||
diagnostic = type.diagnostic
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -217,6 +217,7 @@ fun ConeKotlinType.toFirResolvedTypeRef(
|
||||
buildErrorTypeRef {
|
||||
this.source = source
|
||||
diagnostic = this@toFirResolvedTypeRef.diagnostic
|
||||
type = this@toFirResolvedTypeRef
|
||||
this.delegatedTypeRef = delegatedTypeRef
|
||||
}
|
||||
} else {
|
||||
@@ -275,6 +276,7 @@ fun FirTypeRef.withReplacedConeType(
|
||||
return if (newType is ConeKotlinErrorType) {
|
||||
buildErrorTypeRef {
|
||||
source = newSource
|
||||
type = newType
|
||||
diagnostic = newType.diagnostic
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user