JS backend: report diagonstic message for unsupported element instead of throw exception.
#KT-6507 Fixed
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
$TESTDATA_DIR$/diagnosticForUnhandledElements.kt
|
||||
-no-stdlib
|
||||
-output
|
||||
$TEMP_DIR$/out.js
|
||||
@@ -0,0 +1,18 @@
|
||||
package foo
|
||||
|
||||
annotation class fancy
|
||||
|
||||
[fancy]
|
||||
class Foo {
|
||||
[fancy]
|
||||
fun baz([fancy] foo : Int) : Int {
|
||||
return [fancy] 1
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
|
||||
class A {
|
||||
fun foo(){}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
WARNING: compiler/testData/cli/js/diagnosticForUnhandledElements.kt: (8, 21) Parameter 'foo' is never used
|
||||
ERROR: compiler/testData/cli/js/diagnosticForUnhandledElements.kt: (9, 16) Cannot translate (not supported yet): '[fancy] 1'
|
||||
ERROR: compiler/testData/cli/js/diagnosticForUnhandledElements.kt: (15, 5) Cannot translate (not supported yet): 'class A {...'
|
||||
COMPILATION_ERROR
|
||||
Reference in New Issue
Block a user