[FIR Native] KT-58549: Ensure Cloneable is accessible in native

This commit is contained in:
Nikolay Lunyak
2023-05-16 14:30:58 +03:00
committed by Space Team
parent 5e39bb97a0
commit 5af4230f46
5 changed files with 30 additions and 0 deletions
@@ -24,6 +24,12 @@ public class FirLightTreeOldFrontendNativeDiagnosticsTestGenerated extends Abstr
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/nativeTests"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
}
@Test
@TestMetadata("cloneableInNative.kt")
public void testCloneableInNative() throws Exception {
runTest("compiler/testData/diagnostics/nativeTests/cloneableInNative.kt");
}
@Test
@TestMetadata("identifiers.kt")
public void testIdentifiers() throws Exception {
@@ -24,6 +24,12 @@ public class FirPsiOldFrontendNativeDiagnosticsTestGenerated extends AbstractFir
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/nativeTests"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
}
@Test
@TestMetadata("cloneableInNative.kt")
public void testCloneableInNative() throws Exception {
runTest("compiler/testData/diagnostics/nativeTests/cloneableInNative.kt");
}
@Test
@TestMetadata("identifiers.kt")
public void testIdentifiers() throws Exception {
@@ -0,0 +1,6 @@
// ISSUE: KT-58549
fun main() {
val x: kotlin.Cloneable = if (true) intArrayOf(1) else longArrayOf(1)
x
}
@@ -0,0 +1,6 @@
// ISSUE: KT-58549
fun main() {
val x: kotlin.<!UNRESOLVED_REFERENCE!>Cloneable<!> = if (true) intArrayOf(1) else longArrayOf(1)
<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE, UNUSED_EXPRESSION!>x<!>
}
@@ -24,6 +24,12 @@ public class DiagnosticsNativeTestGenerated extends AbstractDiagnosticsNativeTes
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/nativeTests"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
}
@Test
@TestMetadata("cloneableInNative.kt")
public void testCloneableInNative() throws Exception {
runTest("compiler/testData/diagnostics/nativeTests/cloneableInNative.kt");
}
@Test
@TestMetadata("identifiers.kt")
public void testIdentifiers() throws Exception {