KT-39869 Add inspection for FQN usages of kotlin.browser package
- `kotlin.dom` does not need this because it contains only extensions - Add test for launching whole project fix; mute it because currently it does not pass - The test fails because in tests `RefJavaManager` tries to create `RefJavaFileImpl` for .kt files. It will try to use UAST, but it does not work for JS files. In production this is disabled, so no problems occur
This commit is contained in:
committed by
Roman Golyshev
parent
91fa5d38b3
commit
5cf6b860a6
+10
@@ -0,0 +1,10 @@
|
||||
// "Fix 'kotlin.browser' package usage" "true"
|
||||
// JS
|
||||
|
||||
package test
|
||||
|
||||
fun use(a: Any) {}
|
||||
|
||||
fun usage() {
|
||||
use(kotlin.<caret>browser.localStorage.toString())
|
||||
}
|
||||
Vendored
+10
@@ -0,0 +1,10 @@
|
||||
// "Fix 'kotlin.browser' package usage" "true"
|
||||
// JS
|
||||
|
||||
package test
|
||||
|
||||
fun use(a: Any) {}
|
||||
|
||||
fun usage() {
|
||||
use(kotlinx.browser.localStorage.toString())
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// "Fix 'kotlin.dom' and 'kotlin.browser' packages usages in the project" "true"
|
||||
// JS
|
||||
|
||||
package test
|
||||
|
||||
import kotlin.<caret>browser.localStorage
|
||||
import kotlin.dom.addClass
|
||||
|
||||
fun usage() {
|
||||
kotlin.browser.document.toString()
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// "Fix 'kotlin.dom' and 'kotlin.browser' packages usages in the project" "true"
|
||||
// JS
|
||||
|
||||
package test
|
||||
|
||||
import kotlinx.browser.localStorage
|
||||
import kotlinx.dom.addClass
|
||||
|
||||
fun usage() {
|
||||
kotlinx.browser.document.toString()
|
||||
}
|
||||
Reference in New Issue
Block a user