K2: Fix bounds erasure for raw types

Basically, this commit reworks eraseToUpperBound* stuff
Instead of a bunch of vague flags, we introduce two modes
(rawTypes/intersection emptiness checker) which defined those flags.

Also, it makes choosing `eraseArgumentsDeeply` option always because
that how it works in K1 and also use invariant projection inside
`eraseArgumentsDeeply` for raw types for the same reason.

^KT-57198 Fixed
This commit is contained in:
Denis.Zharkov
2023-03-16 16:54:16 +01:00
committed by Space Team
parent b0de442d76
commit 38138bf079
11 changed files with 72 additions and 42 deletions
@@ -25043,6 +25043,12 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/nonGenericRawMember.kt");
}
@Test
@TestMetadata("nonProjectedInnerErasure.kt")
public void testNonProjectedInnerErasure() throws Exception {
runTest("compiler/testData/diagnostics/tests/platformTypes/rawTypes/nonProjectedInnerErasure.kt");
}
@Test
@TestMetadata("nonRawArraysInRawType.kt")
public void testNonRawArraysInRawType() throws Exception {