[FIR-TEST] Add test with unresolved Array<T>.clone()

This commit is contained in:
Dmitriy Novozhilov
2019-11-26 15:25:43 +03:00
parent 4059fae1b7
commit 5d14c76f70
3 changed files with 19 additions and 0 deletions
@@ -0,0 +1,7 @@
fun test_1(array: Array<String>) {
array.<!UNRESOLVED_REFERENCE!>clone<!>()
}
fun test_2(array: IntArray) {
array.<!UNRESOLVED_REFERENCE!>clone<!>()
}
@@ -0,0 +1,7 @@
FILE: cloneArray.kt
public final fun test_1(array: R|kotlin/Array<kotlin/String>|): R|kotlin/Unit| {
R|<local>/array|.<Unresolved name: clone>#()
}
public final fun test_2(array: R|kotlin/IntArray|): R|kotlin/Unit| {
R|<local>/array|.<Unresolved name: clone>#()
}
@@ -504,6 +504,11 @@ public class FirDiagnosticsWithStdlibTestGenerated extends AbstractFirDiagnostic
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/fir/resolve/testData/resolve/stdlib/problems"), Pattern.compile("^([^.]+)\\.kt$"), true);
}
@TestMetadata("cloneArray.kt")
public void testCloneArray() throws Exception {
runTest("compiler/fir/resolve/testData/resolve/stdlib/problems/cloneArray.kt");
}
@TestMetadata("unresolvedComparator.kt")
public void testUnresolvedComparator() throws Exception {
runTest("compiler/fir/resolve/testData/resolve/stdlib/problems/unresolvedComparator.kt");