From f20ed39b92545924e9c8b819455082a940b0f3f2 Mon Sep 17 00:00:00 2001 From: Anton Bannykh Date: Tue, 18 Feb 2020 15:00:41 +0300 Subject: [PATCH] Fix a typo in an error message --- .../testData/quickfix/migration/jsExternal/nativeMemberAll03.kt | 2 +- .../quickfix/migration/jsExternal/nativeMemberAll03.kt.after | 2 +- .../testData/quickfix/migration/jsExternal/nestedExtension01.kt | 2 +- .../kotlin/js/resolve/diagnostics/DefaultErrorMessagesJs.kt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/idea/testData/quickfix/migration/jsExternal/nativeMemberAll03.kt b/idea/testData/quickfix/migration/jsExternal/nativeMemberAll03.kt index 342e9b53bf1..ac5b3c2a4f9 100644 --- a/idea/testData/quickfix/migration/jsExternal/nativeMemberAll03.kt +++ b/idea/testData/quickfix/migration/jsExternal/nativeMemberAll03.kt @@ -1,6 +1,6 @@ // "Fix with 'asDynamic'" "true" // JS -// ERROR: Declaration of such kind (extension function) cant be external +// ERROR: Declaration of such kind (extension function) can't be external external class B { @nativeGetter diff --git a/idea/testData/quickfix/migration/jsExternal/nativeMemberAll03.kt.after b/idea/testData/quickfix/migration/jsExternal/nativeMemberAll03.kt.after index 308ceb034cb..f70695d0d44 100644 --- a/idea/testData/quickfix/migration/jsExternal/nativeMemberAll03.kt.after +++ b/idea/testData/quickfix/migration/jsExternal/nativeMemberAll03.kt.after @@ -1,6 +1,6 @@ // "Fix with 'asDynamic'" "true" // JS -// ERROR: Declaration of such kind (extension function) cant be external +// ERROR: Declaration of such kind (extension function) can't be external external class B { diff --git a/idea/testData/quickfix/migration/jsExternal/nestedExtension01.kt b/idea/testData/quickfix/migration/jsExternal/nestedExtension01.kt index 8776ae27f00..0905b521d67 100644 --- a/idea/testData/quickfix/migration/jsExternal/nestedExtension01.kt +++ b/idea/testData/quickfix/migration/jsExternal/nestedExtension01.kt @@ -3,7 +3,7 @@ // ACTION: Convert to block body // ACTION: Move to companion object // ACTION: Remove explicit type specification -// ERROR: Declaration of such kind (extension function) cant be external +// ERROR: Declaration of such kind (extension function) can't be external external class A { fun A.bar(): Nothing = definedExternally diff --git a/js/js.frontend/src/org/jetbrains/kotlin/js/resolve/diagnostics/DefaultErrorMessagesJs.kt b/js/js.frontend/src/org/jetbrains/kotlin/js/resolve/diagnostics/DefaultErrorMessagesJs.kt index a6b6beb2a61..536e70028c3 100644 --- a/js/js.frontend/src/org/jetbrains/kotlin/js/resolve/diagnostics/DefaultErrorMessagesJs.kt +++ b/js/js.frontend/src/org/jetbrains/kotlin/js/resolve/diagnostics/DefaultErrorMessagesJs.kt @@ -26,7 +26,7 @@ private val DIAGNOSTIC_FACTORY_TO_RENDERER by lazy { put(ErrorsJs.NOT_SUPPORTED, "Cannot translate (not supported yet): ''{0}''", RenderFirstLineOfElementText) put(ErrorsJs.JSCODE_NO_JAVASCRIPT_PRODUCED, "Argument must be non-empty JavaScript code") put(ErrorsJs.NESTED_EXTERNAL_DECLARATION, "Non top-level `external` declaration") - put(ErrorsJs.WRONG_EXTERNAL_DECLARATION, "Declaration of such kind ({0}) can't be external", Renderers.STRING) + put(ErrorsJs.WRONG_EXTERNAL_DECLARATION, "Declaration of such kind ({0}) can''t be external", Renderers.STRING) put(ErrorsJs.EXTENSION_FUNCTION_IN_EXTERNAL_DECLARATION, "Function types with receiver are prohibited in external declarations") put(ErrorsJs.INLINE_CLASS_IN_EXTERNAL_DECLARATION, "Using inline classes as parameter type or return type of external declarations is not supported")