Test for using dynamic types in conditions
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
// MODULE[js]: m1
|
||||
// FILE: k.kt
|
||||
|
||||
fun test(d: dynamic, b: Boolean?) {
|
||||
if (d) {}
|
||||
while (d) {}
|
||||
do {} while (d)
|
||||
|
||||
if (d || false) {}
|
||||
if (d && true) {}
|
||||
if (d ?: true) {}
|
||||
if (b ?: d) {}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package
|
||||
|
||||
internal fun test(/*0*/ d: dynamic, /*1*/ b: kotlin.Boolean?): kotlin.Unit
|
||||
@@ -3734,6 +3734,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("conditions.kt")
|
||||
public void testConditions() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dynamicTypes/conditions.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("dynamicCalls.kt")
|
||||
public void testDynamicCalls() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dynamicTypes/dynamicCalls.kt");
|
||||
|
||||
Reference in New Issue
Block a user