Report warning on 'Singleton.javaClass'

As a temporary measure before 'javaClass' property is deprecated and removed.
Getting the Java class of a singleton this way is confusing and most of the
time is a failed attempt to get the Java class of a class with a companion
object (e.g. 'Int.javaClass')
This commit is contained in:
Alexander Udalov
2015-08-31 16:01:46 +03:00
parent 3f1bf46756
commit f7a178f978
7 changed files with 159 additions and 1 deletions
@@ -47,6 +47,12 @@ public class JetDiagnosticsTestWithStdLibGenerated extends AbstractJetDiagnostic
doTest(fileName);
}
@TestMetadata("javaClassOnCompanion.kt")
public void testJavaClassOnCompanion() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/javaClassOnCompanion.kt");
doTest(fileName);
}
@TestMetadata("outstar.kt")
public void testOutstar() throws Exception {
String fileName = JetTestUtils.navigationMetadata("compiler/testData/diagnostics/testsWithStdLib/outstar.kt");