From 01f2b0e26b010d6443004e38a6e188ff4f3c640d Mon Sep 17 00:00:00 2001 From: Mikhail Zarechenskiy Date: Fri, 3 Jul 2020 15:09:35 +0300 Subject: [PATCH] Fix test data about `JsExport` It allows only for top-level declarations, plus JsName is needed to avoid error about method redeclaration --- .../inspectionsLocal/unusedSymbol/jsExport.kt | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/idea/testData/inspectionsLocal/unusedSymbol/jsExport.kt b/idea/testData/inspectionsLocal/unusedSymbol/jsExport.kt index aaab4812232..07ae4e93dd9 100644 --- a/idea/testData/inspectionsLocal/unusedSymbol/jsExport.kt +++ b/idea/testData/inspectionsLocal/unusedSymbol/jsExport.kt @@ -1,12 +1,14 @@ // PROBLEM: none // JS -class Person(val name: String) { - fun hello() { - println("Hello $name!") - } - @JsExport - fun hello(greeting: String) { - println("$greeting $name!") - } +val name: String = "" + +fun hello() { + println("Hello $name!") +} + +@JsExport +@JsName("other") +fun hello(greeting: String) { + println("$greeting $name!") } \ No newline at end of file