KT-27524 Don't box (some) inline classes in suspend fun return
If an inline class is mapped to a reference type (or an array), it's Ok to treat JVM view on a suspend function as returning a value of corresponding inline class (although in reality it returns 'Any?' because of COROUTINE_SUSPENDED).
This commit is contained in:
+80
@@ -7733,6 +7733,86 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine.kt", "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("boxUnboxInsideCoroutine_Any.kt")
|
||||
public void testBoxUnboxInsideCoroutine_Any_1_2() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("boxUnboxInsideCoroutine_Any.kt")
|
||||
public void testBoxUnboxInsideCoroutine_Any_1_3() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Any.kt", "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt")
|
||||
public void testBoxUnboxInsideCoroutine_InlineAny_1_2() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("boxUnboxInsideCoroutine_InlineAny.kt")
|
||||
public void testBoxUnboxInsideCoroutine_InlineAny_1_3() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_InlineAny.kt", "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt")
|
||||
public void testBoxUnboxInsideCoroutine_InlineInt_1_2() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("boxUnboxInsideCoroutine_InlineInt.kt")
|
||||
public void testBoxUnboxInsideCoroutine_InlineInt_1_3() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_InlineInt.kt", "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("boxUnboxInsideCoroutine_Int.kt")
|
||||
public void testBoxUnboxInsideCoroutine_Int_1_2() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("boxUnboxInsideCoroutine_Int.kt")
|
||||
public void testBoxUnboxInsideCoroutine_Int_1_3() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Int.kt", "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("boxUnboxInsideCoroutine_Long.kt")
|
||||
public void testBoxUnboxInsideCoroutine_Long_1_2() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("boxUnboxInsideCoroutine_Long.kt")
|
||||
public void testBoxUnboxInsideCoroutine_Long_1_3() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_Long.kt", "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("boxUnboxInsideCoroutine_NAny.kt")
|
||||
public void testBoxUnboxInsideCoroutine_NAny_1_2() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("boxUnboxInsideCoroutine_NAny.kt")
|
||||
public void testBoxUnboxInsideCoroutine_NAny_1_3() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_NAny.kt", "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt")
|
||||
public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_2() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("boxUnboxInsideCoroutine_nonLocalReturn.kt")
|
||||
public void testBoxUnboxInsideCoroutine_nonLocalReturn_1_3() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_nonLocalReturn.kt", "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt")
|
||||
public void testBoxUnboxInsideCoroutine_suspendFunType_1_2() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines.experimental");
|
||||
}
|
||||
|
||||
@TestMetadata("boxUnboxInsideCoroutine_suspendFunType.kt")
|
||||
public void testBoxUnboxInsideCoroutine_suspendFunType_1_3() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/boxUnboxInsideCoroutine_suspendFunType.kt", "kotlin.coroutines");
|
||||
}
|
||||
|
||||
@TestMetadata("bridgeGenerationCrossinline.kt")
|
||||
public void testBridgeGenerationCrossinline_1_2() throws Exception {
|
||||
runTestWithPackageReplacement("compiler/testData/codegen/box/coroutines/inlineClasses/bridgeGenerationCrossinline.kt", "kotlin.coroutines.experimental");
|
||||
|
||||
Reference in New Issue
Block a user