Resolve array access RHS always as the last argument of the call

Also do not attempt to match any of the arguments in the brackets with the last
parameter of the 'set' method

 #KT-10633 Fixed
This commit is contained in:
Alexander Udalov
2016-01-14 02:36:57 +03:00
parent ccef1ad49e
commit 8fe964f269
9 changed files with 199 additions and 32 deletions
@@ -2604,6 +2604,18 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/checkArguments"), Pattern.compile("^(.+)\\.kt$"), true);
}
@TestMetadata("arrayAccessSet.kt")
public void testArrayAccessSet() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/checkArguments/arrayAccessSet.kt");
doTest(fileName);
}
@TestMetadata("arrayAccessSetTooManyArgs.kt")
public void testArrayAccessSetTooManyArgs() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/checkArguments/arrayAccessSetTooManyArgs.kt");
doTest(fileName);
}
@TestMetadata("booleanExpressions.kt")
public void testBooleanExpressions() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/checkArguments/booleanExpressions.kt");
@@ -13077,6 +13089,12 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("kt10633.kt")
public void testKt10633() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt10633.kt");
doTest(fileName);
}
@TestMetadata("kt127.kt")
public void testKt127() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/regressions/kt127.kt");