Test for dynamic calls with lambdas

This commit is contained in:
Andrey Breslav
2014-11-13 03:47:29 +02:00
parent d2e6767c07
commit 0ebc478d50
3 changed files with 25 additions and 0 deletions
@@ -0,0 +1,16 @@
// MODULE[js]: m1
// FILE: k.kt
fun test(d: dynamic) {
d.foo {}
d.foo { <!UNRESOLVED_REFERENCE!>it<!> }
d.foo { <!CANNOT_INFER_PARAMETER_TYPE!>x<!> -> }
d.foo { (x: Int) -> "" }
d.foo { <!CANNOT_INFER_PARAMETER_TYPE!>x<!>, <!CANNOT_INFER_PARAMETER_TYPE!>y<!> -> "" }
d.foo { (x: String, y: Int) -> "" }
}
@@ -0,0 +1,3 @@
package
internal fun test(/*0*/ d: dynamic): kotlin.Unit
@@ -3728,6 +3728,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("dynamicCallsWithLambdas.kt")
public void testDynamicCallsWithLambdas() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dynamicTypes/dynamicCallsWithLambdas.kt");
doTest(fileName);
}
@TestMetadata("dynamicSafeCalls.kt")
public void testDynamicSafeCalls() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dynamicTypes/dynamicSafeCalls.kt");