JVM IR: do not copy type parameters into suspend lambda classes

Declarations inside that class are referencing the type parameters of
the containing function anyway, since we don't do any remapping. So the
resulting IR is slightly more correct, and doesn't lead to type
parameter/argument size mismatch error on IrBased/Wrapped-descriptors.

This reverts a part of 01da7f289b, which looks like it was no longer
necessary after 8d0ffa1444.

 #KT-42028 Fixed
This commit is contained in:
Alexander Udalov
2020-09-18 17:03:50 +02:00
parent bdf502edef
commit d48307ec34
10 changed files with 70 additions and 5 deletions
@@ -6968,6 +6968,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/coroutines/kt35967.kt");
}
@TestMetadata("kt42028.kt")
public void testKt42028() throws Exception {
runTest("compiler/testData/codegen/box/coroutines/kt42028.kt");
}
@TestMetadata("lastExpressionIsLoop.kt")
public void testLastExpressionIsLoop_1_2() throws Exception {
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/lastExpressionIsLoop.kt", "kotlin.coroutines.experimental");