Support Nothing type in typeOf
The proper support will come in KT-15518, but that would be a breaking change even for stable Kotlin without kotlin-reflect. Before that issue is fixed, represent Nothing in types with the Void class, and use a flag in the no-reflect implementation to remember that it's not actually the Void class itself. #KT-39166 Fixed
This commit is contained in:
+20
@@ -29830,6 +29830,16 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/reflection/typeOf/mutableCollections_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nothing_after.kt")
|
||||
public void testNothing_after() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/typeOf/nothing_after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nothing_before.kt")
|
||||
public void testNothing_before() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/typeOf/nothing_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("rawTypes_after.kt")
|
||||
public void testRawTypes_after() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/typeOf/rawTypes_after.kt");
|
||||
@@ -29900,6 +29910,16 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/reflection/typeOf/noReflect/mutableCollections_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nothing_after.kt")
|
||||
public void testNothing_after() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/typeOf/noReflect/nothing_after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nothing_before.kt")
|
||||
public void testNothing_before() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/typeOf/noReflect/nothing_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("rawTypes_after.kt")
|
||||
public void testRawTypes_after() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/reflection/typeOf/noReflect/rawTypes_after.kt");
|
||||
|
||||
Reference in New Issue
Block a user