Never treat @JsExport-annotated declarations as not-used instead of @JsName
This commit is contained in:
@@ -98,7 +98,7 @@ class UnusedSymbolInspection : AbstractKotlinInspection() {
|
||||
|
||||
private val javaInspection = UnusedDeclarationInspection()
|
||||
|
||||
private val KOTLIN_ADDITIONAL_ANNOTATIONS = listOf("kotlin.test.*", "kotlin.js.JsName")
|
||||
private val KOTLIN_ADDITIONAL_ANNOTATIONS = listOf("kotlin.test.*", "kotlin.js.JsExport")
|
||||
|
||||
private val KOTLIN_BUILTIN_ENUM_FUNCTIONS = listOf(FqName("kotlin.enumValues"), FqName("kotlin.enumValueOf"))
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ class Person(val name: String) {
|
||||
println("Hello $name!")
|
||||
}
|
||||
|
||||
@JsName("helloWithGreeting")
|
||||
@JsExport
|
||||
fun <caret>hello(greeting: String) {
|
||||
println("$greeting $name!")
|
||||
}
|
||||
+3
-3
@@ -13531,9 +13531,9 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest {
|
||||
runTest("idea/testData/inspectionsLocal/unusedSymbol/internal.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("jsName.kt")
|
||||
public void testJsName() throws Exception {
|
||||
runTest("idea/testData/inspectionsLocal/unusedSymbol/jsName.kt");
|
||||
@TestMetadata("jsExport.kt")
|
||||
public void testJsExport() throws Exception {
|
||||
runTest("idea/testData/inspectionsLocal/unusedSymbol/jsExport.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("propertyOfInlineClassType.kt")
|
||||
|
||||
Reference in New Issue
Block a user