JS: report about using of external interfaces in class literals

This commit is contained in:
Alexey Andreev
2017-01-25 12:46:41 +03:00
parent deaac83e70
commit ad4fb44827
6 changed files with 35 additions and 1 deletions
@@ -0,0 +1,5 @@
external interface I
fun box() {
println(<!NATIVE_INTERFACE_AS_CLASS_LITERAL!>I::class<!>)
}
@@ -0,0 +1,9 @@
package
public fun box(): kotlin.Unit
public external interface I {
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
}
@@ -955,6 +955,12 @@ public class DiagnosticsTestWithJsStdLibGenerated extends AbstractDiagnosticsTes
doTest(fileName);
}
@TestMetadata("nativeInterfaceClassLiteral.kt")
public void testNativeInterfaceClassLiteral() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/rtti/nativeInterfaceClassLiteral.kt");
doTest(fileName);
}
@TestMetadata("whenIsNativeInterface.kt")
public void testWhenIsNativeInterface() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithJsStdLib/native/rtti/whenIsNativeInterface.kt");