diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/name/classLevelMethodAndProperty.kt b/compiler/testData/diagnostics/testsWithJsStdLib/name/classLevelMethodAndProperty.kt index 6ee21b20fe9..64795442834 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/name/classLevelMethodAndProperty.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/name/classLevelMethodAndProperty.kt @@ -1,7 +1,7 @@ package foo class A { - fun bar() = 23 + fun bar() = 23 - val bar = 23 + val bar = 23 } \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/name/conflictingNamesFromSuperclass.kt b/compiler/testData/diagnostics/testsWithJsStdLib/name/conflictingNamesFromSuperclass.kt index 3457dd8c8ec..e7ad302cc3d 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/name/conflictingNamesFromSuperclass.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/name/conflictingNamesFromSuperclass.kt @@ -7,12 +7,12 @@ interface B { } class C : A, B { - override fun f() {} + override fun f() {} - override fun g() {} + override fun g() {} } -abstract class D : A, B +abstract class D : A, B open class E { open fun f() {} @@ -20,4 +20,4 @@ open class E { open fun g() {} } -class F : E(), A, B +class F : E(), A, B diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/name/extensionPropertyAndMethod.kt b/compiler/testData/diagnostics/testsWithJsStdLib/name/extensionPropertyAndMethod.kt index 7225f197ca3..e07e0455f05 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/name/extensionPropertyAndMethod.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/name/extensionPropertyAndMethod.kt @@ -2,7 +2,7 @@ package foo class A -fun A.get_bar() = 23 +fun A.get_bar() = 23 val A.bar: Int - get() = 42 \ No newline at end of file + get() = 42 \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameAndOverridden.kt b/compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameAndOverridden.kt index 71bc8b9a3e9..cc689dd18c2 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameAndOverridden.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameAndOverridden.kt @@ -1,9 +1,9 @@ package foo open class Super { - fun foo() = 23 + fun foo() = 23 } class Sub : Super() { - @JsName("foo") fun bar() = 42 + @JsName("foo") fun bar() = 42 } \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameClash.kt b/compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameClash.kt index 2a860137cd7..6eb24057fed 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameClash.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameClash.kt @@ -1,5 +1,5 @@ package foo -@JsName("x") fun foo(x: Int) = x +@JsName("x") fun foo(x: Int) = x -@JsName("x") fun bar() = 42 \ No newline at end of file +@JsName("x") fun bar() = 42 \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameClashWithDefault.kt b/compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameClashWithDefault.kt index cc084d752a2..9f677efdfca 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameClashWithDefault.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameClashWithDefault.kt @@ -1,5 +1,5 @@ package foo -@JsName("bar") fun foo(x: Int) = x +@JsName("bar") fun foo(x: Int) = x -fun bar() = 42 \ No newline at end of file +fun bar() = 42 \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameMissingOnAccessors.kt b/compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameMissingOnAccessors.kt index be11b4f8589..6ea3518417e 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameMissingOnAccessors.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameMissingOnAccessors.kt @@ -1,23 +1,23 @@ package foo class A { - var x: Int + var x: Int @JsName("get_x") get() = 23 - set(value) {} + set(value) {} - var y: Int + var y: Int @JsName("get_y") get() = 23 - set(value) {} + set(value) {} var z: Int @JsName("get_z") get() = 23 @JsName("set_z") set(value) {} } -var xx: Int +var xx: Int @JsName("get_xx") get() = 23 - set(value) {} + set(value) {} -var A.ext: Int +var A.ext: Int @JsName("get_ext") get() = 23 - set(value) {} \ No newline at end of file + set(value) {} \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameOnAccessors.kt b/compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameOnAccessors.kt index d8061df95f1..40b690c9a8f 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameOnAccessors.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameOnAccessors.kt @@ -2,6 +2,6 @@ package foo class A { var x: Int - @JsName("xx") get() = 0 - @JsName("xx") set(value) {} + @JsName("xx") get() = 0 + @JsName("xx") set(value) {} } \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameUseTargetOnProperty.kt b/compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameUseTargetOnProperty.kt index 224e54f28eb..fa07812ba5f 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameUseTargetOnProperty.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/name/jsNameUseTargetOnProperty.kt @@ -1,5 +1,5 @@ class A { @property:JsName("x_") @get:JsName("getX_") val x: Int = 0 - @get:JsName("getY_") var y: Int = 0 + @get:JsName("getY_") var y: Int = 0 } \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/name/methodAndMethod.kt b/compiler/testData/diagnostics/testsWithJsStdLib/name/methodAndMethod.kt index c43a8179715..9b4b08a8656 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/name/methodAndMethod.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/name/methodAndMethod.kt @@ -1,5 +1,5 @@ package foo -fun bar(x: Int) = x +fun bar(x: Int) = x -fun `bar_za3lpa$`() = 42 \ No newline at end of file +fun `bar_za3lpa$`() = 42 \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/name/packageAndMethod.kt b/compiler/testData/diagnostics/testsWithJsStdLib/name/packageAndMethod.kt index 006b7e2273a..095ecacee8d 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/name/packageAndMethod.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/name/packageAndMethod.kt @@ -2,7 +2,7 @@ package foo -fun bar() = 23 +fun bar() = 23 // FILE: foobar.kt diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/name/packageAndProperty.kt b/compiler/testData/diagnostics/testsWithJsStdLib/name/packageAndProperty.kt index cdd5085777c..133bb4ea171 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/name/packageAndProperty.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/name/packageAndProperty.kt @@ -2,7 +2,7 @@ package foo -val bar = 23 +val bar = 23 // FILE: foobar.kt diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/name/privateJsNameClash.kt b/compiler/testData/diagnostics/testsWithJsStdLib/name/privateJsNameClash.kt index ec4f86cbde1..21dda09a4dc 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/name/privateJsNameClash.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/name/privateJsNameClash.kt @@ -1,5 +1,5 @@ package foo -@JsName("bar") private fun foo(x: Int) = x +@JsName("bar") private fun foo(x: Int) = x -fun bar() = 42 \ No newline at end of file +fun bar() = 42 \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/name/propertyAndMethodInSubclass.kt b/compiler/testData/diagnostics/testsWithJsStdLib/name/propertyAndMethodInSubclass.kt index c02e60b608b..fdc6a30ffc7 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/name/propertyAndMethodInSubclass.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/name/propertyAndMethodInSubclass.kt @@ -1,9 +1,9 @@ package foo open class Super { - val foo = 23 + val foo = 23 } class Sub : Super() { - fun foo() = 42 + fun foo() = 42 } \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/name/topLevelMethodAndJsNameConstructor.kt b/compiler/testData/diagnostics/testsWithJsStdLib/name/topLevelMethodAndJsNameConstructor.kt index 1e12d8bd1af..3728c2791d8 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/name/topLevelMethodAndJsNameConstructor.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/name/topLevelMethodAndJsNameConstructor.kt @@ -1,7 +1,7 @@ package foo class A(val x: String) { - @JsName("aa") constructor(x: Int) : this("int $x") + @JsName("aa") constructor(x: Int) : this("int $x") } -fun aa() {} \ No newline at end of file +fun aa() {} \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithJsStdLib/name/topLevelMethodAndProperty.kt b/compiler/testData/diagnostics/testsWithJsStdLib/name/topLevelMethodAndProperty.kt index d313c5f3373..815fd69cad0 100644 --- a/compiler/testData/diagnostics/testsWithJsStdLib/name/topLevelMethodAndProperty.kt +++ b/compiler/testData/diagnostics/testsWithJsStdLib/name/topLevelMethodAndProperty.kt @@ -1,5 +1,5 @@ package foo -fun bar() = 23 +fun bar() = 23 -val bar = 32 \ No newline at end of file +val bar = 32 \ No newline at end of file diff --git a/js/js.frontend/src/org/jetbrains/kotlin/js/resolve/diagnostics/ErrorsJs.java b/js/js.frontend/src/org/jetbrains/kotlin/js/resolve/diagnostics/ErrorsJs.java index f18fe31c05e..259d916e8f6 100644 --- a/js/js.frontend/src/org/jetbrains/kotlin/js/resolve/diagnostics/ErrorsJs.java +++ b/js/js.frontend/src/org/jetbrains/kotlin/js/resolve/diagnostics/ErrorsJs.java @@ -42,12 +42,13 @@ public interface ErrorsJs { DiagnosticFactory1 REFERENCE_TO_BUILTIN_MEMBERS_NOT_SUPPORTED = DiagnosticFactory1.create(ERROR, DEFAULT); DiagnosticFactory0 JSCODE_NO_JAVASCRIPT_PRODUCED = DiagnosticFactory0.create(ERROR, DEFAULT); DiagnosticFactory0 NATIVE_INNER_CLASS_PROHIBITED = DiagnosticFactory0.create(ERROR); - DiagnosticFactory2 JS_NAME_CLASH = DiagnosticFactory2.create(ERROR); + DiagnosticFactory2 JS_NAME_CLASH = DiagnosticFactory2.create( + ERROR, DECLARATION_SIGNATURE_OR_DEFAULT); DiagnosticFactory3 JS_NAME_CLASH_SYNTHETIC = - DiagnosticFactory3.create(ERROR); + DiagnosticFactory3.create(ERROR, DECLARATION_SIGNATURE_OR_DEFAULT); DiagnosticFactory0 JS_NAME_ON_PRIMARY_CONSTRUCTOR_PROHIBITED = DiagnosticFactory0.create(ERROR); DiagnosticFactory0 JS_NAME_ON_ACCESSOR_AND_PROPERTY = DiagnosticFactory0.create(ERROR); - DiagnosticFactory0 JS_NAME_IS_NOT_ON_ALL_ACCESSORS = DiagnosticFactory0.create(ERROR); + DiagnosticFactory0 JS_NAME_IS_NOT_ON_ALL_ACCESSORS = DiagnosticFactory0.create(ERROR, DECLARATION_SIGNATURE_OR_DEFAULT); DiagnosticFactory0 JS_NAME_PROHIBITED_FOR_OVERRIDE = DiagnosticFactory0.create(ERROR); DiagnosticFactory0 JS_NAME_PROHIBITED_FOR_EXTENSION_PROPERTY = DiagnosticFactory0.create(ERROR);