[FIR] Fix false positive USELESS_CAST on stub types, ^KT-50293 Fixed
This commit is contained in:
+1
@@ -265,6 +265,7 @@ object BuilderConfigurator : AbstractBuilderConfigurator<FirTreeBuilder>(FirTree
|
||||
|
||||
builder(resolvedTypeRef) {
|
||||
defaultNull("delegatedTypeRef")
|
||||
default("isFromStubType", "false")
|
||||
withCopy()
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -224,7 +224,7 @@ object ImplementationConfigurator : AbstractFirTreeImplementationConfigurator()
|
||||
"getter", "setter",
|
||||
withGetter = true
|
||||
)
|
||||
default("returnTypeRef", "FirErrorTypeRefImpl(null, null, diagnostic)")
|
||||
default("returnTypeRef", "FirErrorTypeRefImpl(null, null, diagnostic, false)")
|
||||
useTypes(errorTypeRefImplType)
|
||||
}
|
||||
|
||||
@@ -421,13 +421,13 @@ object ImplementationConfigurator : AbstractFirTreeImplementationConfigurator()
|
||||
}
|
||||
|
||||
impl(errorExpression) {
|
||||
default("typeRef", "FirErrorTypeRefImpl(source, null, ConeStubDiagnostic(diagnostic))")
|
||||
default("typeRef", "FirErrorTypeRefImpl(source, null, ConeStubDiagnostic(diagnostic), false)")
|
||||
useTypes(errorTypeRefImplType, coneStubDiagnosticType)
|
||||
}
|
||||
|
||||
impl(errorFunction) {
|
||||
defaultNull("receiverTypeRef", "body", withGetter = true)
|
||||
default("returnTypeRef", "FirErrorTypeRefImpl(null, null, diagnostic)")
|
||||
default("returnTypeRef", "FirErrorTypeRefImpl(null, null, diagnostic, false)")
|
||||
useTypes(errorTypeRefImplType)
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -637,6 +637,7 @@ object NodeConfigurator : AbstractFieldConfigurator<FirTreeBuilder>(FirTreeBuild
|
||||
resolvedTypeRef.configure {
|
||||
+field("type", coneKotlinTypeType)
|
||||
+field("delegatedTypeRef", typeRef, nullable = true)
|
||||
+booleanField("isFromStubType")
|
||||
}
|
||||
|
||||
typeRefWithNullability.configure {
|
||||
|
||||
Reference in New Issue
Block a user