Test for substitutions with dynamic types

This commit is contained in:
Andrey Breslav
2014-11-19 21:51:14 +03:00
parent a1c1d25575
commit 71b2e8bcf1
3 changed files with 28 additions and 0 deletions
@@ -0,0 +1,11 @@
// !MARK_DYNAMIC_CALLS
// MODULE[js]: m1
// FILE: k.kt
fun foo(d: dynamic) {
Foo(d).p.<!DEBUG_INFO_DYNAMIC!>bar<!>()
}
class Foo<T>(val p: T)
@@ -0,0 +1,11 @@
package
internal fun foo(/*0*/ d: dynamic): kotlin.Unit
internal final class Foo</*0*/ T> {
public constructor Foo</*0*/ T>(/*0*/ p: T)
internal final val p: T
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@@ -3794,6 +3794,12 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest {
doTest(fileName);
}
@TestMetadata("substitution.kt")
public void testSubstitution() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dynamicTypes/substitution.kt");
doTest(fileName);
}
@TestMetadata("unsupported.kt")
public void testUnsupported() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/tests/dynamicTypes/unsupported.kt");