Disallow named arguments for SAM adapters

SAM adapters are Java functions, and named arguments are not allowed for Java
functions

 #KT-5022 Fixed
This commit is contained in:
Alexander Udalov
2014-06-27 17:31:44 +04:00
parent 6e1047685c
commit c0fc5cfb53
12 changed files with 79 additions and 37 deletions
@@ -5480,6 +5480,16 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
doTest("compiler/testData/diagnostics/tests/namedArguments/disallowForJavaMethods.kt");
}
@TestMetadata("disallowForSamAdapterConstructor.kt")
public void testDisallowForSamAdapterConstructor() throws Exception {
doTest("compiler/testData/diagnostics/tests/namedArguments/disallowForSamAdapterConstructor.kt");
}
@TestMetadata("disallowForSamAdapterFunction.kt")
public void testDisallowForSamAdapterFunction() throws Exception {
doTest("compiler/testData/diagnostics/tests/namedArguments/disallowForSamAdapterFunction.kt");
}
@TestMetadata("namedArgumentsAndDefaultValues.kt")
public void testNamedArgumentsAndDefaultValues() throws Exception {
doTest("compiler/testData/diagnostics/tests/namedArguments/namedArgumentsAndDefaultValues.kt");