mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
KTIJ-31786 [kotlin] Recognize symbols from dynamic scope as definitely not imported in K2 Mode Import Optimizer
^KTIJ-31786 Fixed (cherry picked from commit e07b328a2dd4408cd12ed1d6835de7e7890f0a2b) IJ-CR-149236 GitOrigin-RevId: 6862fc09726e170610171aa88256a02e0c419cc7
This commit is contained in:
committed by
intellij-monorepo-bot
parent
8f6bd1f985
commit
02ca53d4b9
+4
@@ -31,6 +31,10 @@ internal class ReferencedSymbol(val reference: KtReference, val symbol: KaSymbol
|
||||
private val KaSession.definitelyNotImported: Boolean get() = when {
|
||||
symbol.isLocal -> true
|
||||
|
||||
// symbols from <dynamic> scope cannot be imported,
|
||||
// they do not have stable identities and FQNs
|
||||
symbol.origin == KaSymbolOrigin.JS_DYNAMIC -> true
|
||||
|
||||
symbol is KaPackageSymbol -> true
|
||||
symbol is KaReceiverParameterSymbol -> true
|
||||
symbol is KaTypeParameterSymbol -> true
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_K2
|
||||
package test
|
||||
|
||||
import kotlin.js.JSON // unused
|
||||
|
||||
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_K2
|
||||
package test
|
||||
|
||||
fun getValue(data: dynamic): dynamic {
|
||||
|
||||
Reference in New Issue
Block a user