FIR: Support DNN types during unification of bare types

See org.jetbrains.kotlin.test.runners.FirDiagnosticTestGenerated.Resolve.Types.testBareWithFlexibleArg
This commit is contained in:
Denis.Zharkov
2022-04-21 11:32:05 +03:00
committed by teamcity
parent 8a742b2574
commit a0c92db819
@@ -76,6 +76,14 @@ fun FirSession.doUnify(
)
}
if (typeWithParameters is ConeDefinitelyNotNullType) {
return doUnify(
originalTypeProjection,
typeWithParametersProjection.replaceType(typeWithParameters.original),
targetTypeParameters, result,
)
}
// Foo ~ X? => fail
if (originalType?.nullability != ConeNullability.NULLABLE && typeWithParameters?.nullability == ConeNullability.NULLABLE) {
return true