diff --git a/compiler/testData/cli/js/diagnosticForUnhandledElements.kt b/compiler/testData/cli/js/diagnosticForUnhandledElements.kt index 3857bad825d..5eafcb31095 100644 --- a/compiler/testData/cli/js/diagnosticForUnhandledElements.kt +++ b/compiler/testData/cli/js/diagnosticForUnhandledElements.kt @@ -9,10 +9,3 @@ class Foo { return [fancy] 1 } } - -fun test() { - - class A { - fun foo(){} - } -} diff --git a/compiler/testData/cli/js/diagnosticForUnhandledElements.out b/compiler/testData/cli/js/diagnosticForUnhandledElements.out index 5d225ef737b..c2a6a5cd944 100644 --- a/compiler/testData/cli/js/diagnosticForUnhandledElements.out +++ b/compiler/testData/cli/js/diagnosticForUnhandledElements.out @@ -1,4 +1,3 @@ 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 \ No newline at end of file +COMPILATION_ERROR diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/conventions.kt b/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/conventions.kt index f52161bd368..c7231e855f8 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/conventions.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/conventions.kt @@ -1,3 +1,4 @@ +// !DIAGNOSTICS: -NON_TOPLEVEL_CLASS_DECLARATION // !MARK_DYNAMIC_CALLS fun test(d: dynamic) { @@ -97,4 +98,4 @@ fun test(d: dynamic) { val dyn: dynamic = null val foo : Int by dyn -var bar : Int by dyn \ No newline at end of file +var bar : Int by dyn diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/noUnsupportedInLocals.kt b/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/noUnsupportedInLocals.kt index e6b5f154919..576bc384edc 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/noUnsupportedInLocals.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/dynamicTypes/noUnsupportedInLocals.kt @@ -1,7 +1,9 @@ +// !DIAGNOSTICS: -NON_TOPLEVEL_CLASS_DECLARATION + val foo: dynamic = 1 fun foo() { class C { val foo: dynamic = 1 } -} \ No newline at end of file +} diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onLocalNonNativeClassMembers.kt b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onLocalNonNativeClassMembers.kt index 41d02f4b6fa..2d3f22f1f49 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onLocalNonNativeClassMembers.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onLocalNonNativeClassMembers.kt @@ -1,4 +1,4 @@ -// !DIAGNOSTICS: -UNUSED_PARAMETER +// !DIAGNOSTICS: -UNUSED_PARAMETER -NON_TOPLEVEL_CLASS_DECLARATION fun foo() { class A { @@ -42,4 +42,4 @@ fun foo() { nativeGetter fun baz(a: Int = 0): Int? = 0 } -} \ No newline at end of file +} diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onLocalOtherDeclarations.kt b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onLocalOtherDeclarations.kt index f66758e103d..3f0754a7712 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onLocalOtherDeclarations.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onLocalOtherDeclarations.kt @@ -1,4 +1,4 @@ -// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE +// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE -NON_TOPLEVEL_CLASS_DECLARATION fun foo() { [nativeGetter] diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNestedDeclarationsInsideNonNativeClass.kt b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNestedDeclarationsInsideNonNativeClass.kt index f001ff1423c..e901e3e02d9 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNestedDeclarationsInsideNonNativeClass.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeGetter/onNestedDeclarationsInsideNonNativeClass.kt @@ -1,4 +1,4 @@ -// !DIAGNOSTICS: -UNUSED_PARAMETER +// !DIAGNOSTICS: -UNUSED_PARAMETER -NON_TOPLEVEL_CLASS_DECLARATION class A { class B { @@ -109,4 +109,4 @@ class A { fun baz(a: String = "foo"): Int? = 0 } } -} \ No newline at end of file +} diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onLocalNonNativeClassMembers.kt b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onLocalNonNativeClassMembers.kt index a92d00345c4..f6cea21bccb 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onLocalNonNativeClassMembers.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onLocalNonNativeClassMembers.kt @@ -1,4 +1,4 @@ -// !DIAGNOSTICS: -UNUSED_PARAMETER +// !DIAGNOSTICS: -UNUSED_PARAMETER -NON_TOPLEVEL_CLASS_DECLARATION fun foo() { class A { @@ -22,4 +22,4 @@ fun foo() { fun invoke(a: String): Int = 0 } } -} \ No newline at end of file +} diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onLocalOtherDeclarations.kt b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onLocalOtherDeclarations.kt index cfeff793c9f..d7904aa17f0 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onLocalOtherDeclarations.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onLocalOtherDeclarations.kt @@ -1,4 +1,4 @@ -// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE +// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE -NON_TOPLEVEL_CLASS_DECLARATION fun foo() { [nativeInvoke] diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNestedDeclarationsInsideNonNativeClass.kt b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNestedDeclarationsInsideNonNativeClass.kt index 5cf55719013..8edfa72622b 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNestedDeclarationsInsideNonNativeClass.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeInvoke/onNestedDeclarationsInsideNonNativeClass.kt @@ -1,4 +1,4 @@ -// !DIAGNOSTICS: -UNUSED_PARAMETER +// !DIAGNOSTICS: -UNUSED_PARAMETER -NON_TOPLEVEL_CLASS_DECLARATION class A { class B { @@ -40,4 +40,4 @@ class A { fun invoke(a: String): Int = 0 } } -} \ No newline at end of file +} diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onLocalNonNativeClassMembers.kt b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onLocalNonNativeClassMembers.kt index c5b1af46a0a..944e580a355 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onLocalNonNativeClassMembers.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onLocalNonNativeClassMembers.kt @@ -1,4 +1,4 @@ -// !DIAGNOSTICS: -UNUSED_PARAMETER +// !DIAGNOSTICS: -UNUSED_PARAMETER -NON_TOPLEVEL_CLASS_DECLARATION fun foo() { class A { @@ -42,4 +42,4 @@ fun foo() { [nativeSetter] fun foo(a: Int = 0, v: String) = "OK" } -} \ No newline at end of file +} diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onLocalOtherDeclarations.kt b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onLocalOtherDeclarations.kt index 9163557a454..4ad43ce1a11 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onLocalOtherDeclarations.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onLocalOtherDeclarations.kt @@ -1,4 +1,4 @@ -// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE +// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE -NON_TOPLEVEL_CLASS_DECLARATION fun foo() { [nativeSetter] @@ -9,4 +9,4 @@ fun foo() { [nativeSetter] class Foo {} -} \ No newline at end of file +} diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNestedDeclarationsInsideNonNativeClass.kt b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNestedDeclarationsInsideNonNativeClass.kt index ebaf3c43ce3..188f93de162 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNestedDeclarationsInsideNonNativeClass.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/native/nativeSetter/onNestedDeclarationsInsideNonNativeClass.kt @@ -1,4 +1,4 @@ -// !DIAGNOSTICS: -UNUSED_PARAMETER +// !DIAGNOSTICS: -UNUSED_PARAMETER -NON_TOPLEVEL_CLASS_DECLARATION class A { class B { @@ -127,4 +127,4 @@ class A { fun foo(a: Number = 0.0, v: String) = "OK" } } -} \ No newline at end of file +}