Test for dynamic calls with lambdas
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user