JS backend: report diagnostic for class literal(Foo::class) instead of crash with Exception.

This commit is contained in:
Zalim Bashorov
2015-03-16 22:23:52 +03:00
parent 8d6cbb671a
commit 975c4ffab5
5 changed files with 20 additions and 5 deletions
@@ -0,0 +1,4 @@
$TESTDATA_DIR$/diagnosticForClassLiteral.kt
-no-stdlib
-output
$TEMP_DIR$/out.js
@@ -0,0 +1,7 @@
package foo
class A
fun test() {
A::class
}
@@ -0,0 +1,3 @@
WARNING: compiler/testData/cli/js/diagnosticForClassLiteral.kt: (6, 5) The expression is unused
ERROR: compiler/testData/cli/js/diagnosticForClassLiteral.kt: (6, 6) Reflection types can't be loaded. Please ensure that you have Kotlin Runtime in your classpath
COMPILATION_ERROR