Correctly map nullable generic underlying value of inline class
if upper bound is primitive type. #KT-32162
This commit is contained in:
@@ -83,7 +83,9 @@ object AbstractTypeMapper {
|
||||
typeConstructor.isTypeParameter() -> {
|
||||
val typeParameter = typeConstructor.asTypeParameter()
|
||||
val upperBound = typeParameter.representativeUpperBound()
|
||||
val newType = if (upperBound.typeConstructor().isInlineClass() && type.isNullableType())
|
||||
val upperBoundIsPrimitiveOrInlineClass =
|
||||
upperBound.typeConstructor().isInlineClass() || upperBound is SimpleTypeMarker && upperBound.isPrimitiveType()
|
||||
val newType = if (upperBoundIsPrimitiveOrInlineClass && type.isNullableType())
|
||||
upperBound.makeNullable()
|
||||
else upperBound
|
||||
|
||||
|
||||
+36
@@ -21559,6 +21559,42 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGenericWithInterface.kt")
|
||||
public void testUnboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGenericWithInterface() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGenericWithInterface.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGenericWithInterface2.kt")
|
||||
public void testUnboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGenericWithInterface2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGenericWithInterface2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingType.kt")
|
||||
public void testUnboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingType() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingType.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGeneric.kt")
|
||||
public void testUnboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGeneric() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGenericWithInterface.kt")
|
||||
public void testUnboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGenericWithInterface() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGenericWithInterface.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGenericWithInterface2.kt")
|
||||
public void testUnboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGenericWithInterface2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGenericWithInterface2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unboxNullableValueOfInlineClassWithPrimitiveUnderlyingType.kt")
|
||||
public void testUnboxNullableValueOfInlineClassWithPrimitiveUnderlyingType() throws Exception {
|
||||
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
// WITH_STDLIB
|
||||
// WORKS_WHEN_VALUE_CLASS
|
||||
// IGNORE_BACKEND: JVM
|
||||
// LANGUAGE: +ValueClasses, +GenericInlineClassParameter
|
||||
|
||||
class BoxT<T>(val boxed: T)
|
||||
class BoxAny(val boxed: Any?)
|
||||
class BoxFoo(val boxed: IFoo?)
|
||||
|
||||
interface IFoo
|
||||
|
||||
interface Marker
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class IcInt(val i: Int): Marker
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class I32<T: Marker>(val value: T?) : IFoo where T: IcInt
|
||||
|
||||
fun <T: Marker> boxToTypeParameter(x: I32<T>?) where T: IcInt = BoxT(x)
|
||||
fun <T: Marker> boxToNullableAny(x: I32<T>?) where T: IcInt = BoxAny(x)
|
||||
fun <T: Marker> boxToNullableInterface(x: I32<T>?) where T: IcInt = BoxFoo(x)
|
||||
|
||||
fun <T: Marker> useNullableI32(x: I32<T>?) where T: IcInt {
|
||||
if (x != null) throw AssertionError()
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
useNullableI32(boxToTypeParameter<IcInt>(null).boxed)
|
||||
useNullableI32(boxToNullableAny<IcInt>(null).boxed as I32<IcInt>?)
|
||||
useNullableI32(boxToNullableInterface<IcInt>(null).boxed as I32<IcInt>?)
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
// WITH_STDLIB
|
||||
// WORKS_WHEN_VALUE_CLASS
|
||||
// IGNORE_BACKEND: JVM
|
||||
// LANGUAGE: +ValueClasses, +GenericInlineClassParameter
|
||||
|
||||
class BoxT<T>(val boxed: T)
|
||||
class BoxAny(val boxed: Any?)
|
||||
class BoxFoo(val boxed: IFoo?)
|
||||
|
||||
interface IFoo
|
||||
|
||||
interface Marker
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class IcInt(val i: Int): Marker
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class I32<T: IcInt>(val value: T?) : IFoo where T: Marker
|
||||
|
||||
fun <T: IcInt> boxToTypeParameter(x: I32<T>?) where T: Marker = BoxT(x)
|
||||
fun <T: IcInt> boxToNullableAny(x: I32<T>?) where T: Marker = BoxAny(x)
|
||||
fun <T: IcInt> boxToNullableInterface(x: I32<T>?) where T: Marker = BoxFoo(x)
|
||||
|
||||
fun <T: IcInt> useNullableI32(x: I32<T>?) where T: Marker {
|
||||
if (x != null) throw AssertionError()
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
useNullableI32(boxToTypeParameter<IcInt>(null).boxed)
|
||||
useNullableI32(boxToNullableAny<IcInt>(null).boxed as I32<IcInt>?)
|
||||
useNullableI32(boxToNullableInterface<IcInt>(null).boxed as I32<IcInt>?)
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
// WITH_STDLIB
|
||||
// WORKS_WHEN_VALUE_CLASS
|
||||
// LANGUAGE: +ValueClasses
|
||||
|
||||
class BoxT<T>(val boxed: T)
|
||||
class BoxAny(val boxed: Any?)
|
||||
class BoxFoo(val boxed: IFoo?)
|
||||
|
||||
interface IFoo
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class I32(val value: Int?) : IFoo
|
||||
|
||||
fun boxToTypeParameter(x: I32?) = BoxT(x)
|
||||
fun boxToNullableAny(x: I32?) = BoxAny(x)
|
||||
fun boxToNullableInterface(x: I32?) = BoxFoo(x)
|
||||
|
||||
fun useNullableI32(x: I32?) {
|
||||
if (x != null) throw AssertionError()
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
useNullableI32(boxToTypeParameter(null).boxed)
|
||||
useNullableI32(boxToNullableAny(null).boxed as I32?)
|
||||
useNullableI32(boxToNullableInterface(null).boxed as I32?)
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
// WITH_STDLIB
|
||||
// WORKS_WHEN_VALUE_CLASS
|
||||
// LANGUAGE: +ValueClasses, +GenericInlineClassParameter
|
||||
|
||||
class BoxT<T>(val boxed: T)
|
||||
class BoxAny(val boxed: Any?)
|
||||
class BoxFoo(val boxed: IFoo?)
|
||||
|
||||
interface IFoo
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class I32<T: Int>(val value: T?) : IFoo
|
||||
|
||||
fun <T: Int> boxToTypeParameter(x: I32<T>?) = BoxT(x)
|
||||
fun <T: Int> boxToNullableAny(x: I32<T>?) = BoxAny(x)
|
||||
fun <T: Int> boxToNullableInterface(x: I32<T>?) = BoxFoo(x)
|
||||
|
||||
fun <T: Int> useNullableI32(x: I32<T>?) {
|
||||
if (x != null) throw AssertionError()
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
useNullableI32(boxToTypeParameter<Int>(null).boxed)
|
||||
useNullableI32(boxToNullableAny<Int>(null).boxed as I32<Int>?)
|
||||
useNullableI32(boxToNullableInterface<Int>(null).boxed as I32<Int>?)
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
// WITH_STDLIB
|
||||
// WORKS_WHEN_VALUE_CLASS
|
||||
// IGNORE_BACKEND: JVM
|
||||
// LANGUAGE: +ValueClasses, +GenericInlineClassParameter
|
||||
|
||||
class BoxT<T>(val boxed: T)
|
||||
class BoxAny(val boxed: Any?)
|
||||
class BoxFoo(val boxed: IFoo?)
|
||||
|
||||
interface IFoo
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class I32<T: Int>(val value: T?) : IFoo where T: Comparable<Int>
|
||||
|
||||
fun <T: Int> boxToTypeParameter(x: I32<T>?) where T: Comparable<Int> = BoxT(x)
|
||||
fun <T: Int> boxToNullableAny(x: I32<T>?) where T: Comparable<Int> = BoxAny(x)
|
||||
fun <T: Int> boxToNullableInterface(x: I32<T>?) where T: Comparable<Int> = BoxFoo(x)
|
||||
|
||||
fun <T: Int> useNullableI32(x: I32<T>?) where T: Comparable<Int> {
|
||||
if (x != null) throw AssertionError()
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
useNullableI32(boxToTypeParameter<Int>(null).boxed)
|
||||
useNullableI32(boxToNullableAny<Int>(null).boxed as I32<Int>?)
|
||||
useNullableI32(boxToNullableInterface<Int>(null).boxed as I32<Int>?)
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
// WITH_STDLIB
|
||||
// WORKS_WHEN_VALUE_CLASS
|
||||
// IGNORE_BACKEND: JVM
|
||||
// LANGUAGE: +ValueClasses, +GenericInlineClassParameter
|
||||
|
||||
class BoxT<T>(val boxed: T)
|
||||
class BoxAny(val boxed: Any?)
|
||||
class BoxFoo(val boxed: IFoo?)
|
||||
|
||||
interface IFoo
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class I32<T: Comparable<Int>>(val value: T?) : IFoo where T: Int
|
||||
|
||||
fun <T: Comparable<Int>> boxToTypeParameter(x: I32<T>?) where T: Int = BoxT(x)
|
||||
fun <T: Comparable<Int>> boxToNullableAny(x: I32<T>?) where T: Int = BoxAny(x)
|
||||
fun <T: Comparable<Int>> boxToNullableInterface(x: I32<T>?) where T: Int = BoxFoo(x)
|
||||
|
||||
fun <T: Comparable<Int>> useNullableI32(x: I32<T>?) where T: Int {
|
||||
if (x != null) throw AssertionError()
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
useNullableI32(boxToTypeParameter<Int>(null).boxed)
|
||||
useNullableI32(boxToNullableAny<Int>(null).boxed as I32<Int>?)
|
||||
useNullableI32(boxToNullableInterface<Int>(null).boxed as I32<Int>?)
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+1
-1
@@ -9,7 +9,7 @@ class BoxFoo(val boxed: IFoo?)
|
||||
interface IFoo
|
||||
|
||||
OPTIONAL_JVM_INLINE_ANNOTATION
|
||||
value class I32<T: Int>(val value: T?) : IFoo
|
||||
value class I32<T: Int>(val value: T) : IFoo
|
||||
|
||||
fun <T: Int> boxToTypeParameter(x: I32<T>?) = BoxT(x)
|
||||
fun <T: Int> boxToNullableAny(x: I32<T>?) = BoxAny(x)
|
||||
|
||||
+36
@@ -21133,6 +21133,42 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGenericWithInterface.kt")
|
||||
public void testUnboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGenericWithInterface() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGenericWithInterface.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGenericWithInterface2.kt")
|
||||
public void testUnboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGenericWithInterface2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGenericWithInterface2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingType.kt")
|
||||
public void testUnboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingType() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingType.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGeneric.kt")
|
||||
public void testUnboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGeneric() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGenericWithInterface.kt")
|
||||
public void testUnboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGenericWithInterface() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGenericWithInterface.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGenericWithInterface2.kt")
|
||||
public void testUnboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGenericWithInterface2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGenericWithInterface2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unboxNullableValueOfInlineClassWithPrimitiveUnderlyingType.kt")
|
||||
public void testUnboxNullableValueOfInlineClassWithPrimitiveUnderlyingType() throws Exception {
|
||||
|
||||
+36
@@ -21559,6 +21559,42 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGenericWithInterface.kt")
|
||||
public void testUnboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGenericWithInterface() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGenericWithInterface.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGenericWithInterface2.kt")
|
||||
public void testUnboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGenericWithInterface2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGenericWithInterface2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingType.kt")
|
||||
public void testUnboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingType() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingType.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGeneric.kt")
|
||||
public void testUnboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGeneric() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGenericWithInterface.kt")
|
||||
public void testUnboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGenericWithInterface() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGenericWithInterface.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGenericWithInterface2.kt")
|
||||
public void testUnboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGenericWithInterface2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGenericWithInterface2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("unboxNullableValueOfInlineClassWithPrimitiveUnderlyingType.kt")
|
||||
public void testUnboxNullableValueOfInlineClassWithPrimitiveUnderlyingType() throws Exception {
|
||||
|
||||
+30
@@ -16003,6 +16003,26 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/toStringOfUnboxedNullableGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@TestMetadata("unboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGenericWithInterface.kt")
|
||||
public void ignoreUnboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGenericWithInterface() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGenericWithInterface.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@TestMetadata("unboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGenericWithInterface2.kt")
|
||||
public void ignoreUnboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGenericWithInterface2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGenericWithInterface2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@TestMetadata("unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGenericWithInterface.kt")
|
||||
public void ignoreUnboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGenericWithInterface() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGenericWithInterface.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@TestMetadata("unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGenericWithInterface2.kt")
|
||||
public void ignoreUnboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGenericWithInterface2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGenericWithInterface2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath);
|
||||
}
|
||||
@@ -17585,6 +17605,16 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@TestMetadata("unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingType.kt")
|
||||
public void testUnboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingType() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingType.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@TestMetadata("unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGeneric.kt")
|
||||
public void testUnboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGeneric() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
}
|
||||
|
||||
@TestMetadata("unboxNullableValueOfInlineClassWithPrimitiveUnderlyingType.kt")
|
||||
public void testUnboxNullableValueOfInlineClassWithPrimitiveUnderlyingType() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithPrimitiveUnderlyingType.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal());
|
||||
|
||||
Reference in New Issue
Block a user