mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[kotlin] String literal within val/var declaration should be re-analyzed
#KTIJ-25528 #KTIJ-20783 Fixed GitOrigin-RevId: 4dbc9fceb7f45bd9450720f14286dfd90fbef8c2
This commit is contained in:
committed by
intellij-monorepo-bot
parent
51c1839b31
commit
90cda71e63
+1
-1
@@ -75,7 +75,7 @@ class PureKotlinCodeBlockModificationListener(val project: Project) : Disposable
|
||||
|
||||
private inline fun isStringLiteralChange(changeSet: TreeChangeEvent): Boolean = isSpecificChange(changeSet) {
|
||||
it?.elementType == KtTokens.REGULAR_STRING_PART &&
|
||||
it?.psi?.parentOfTypes(KtAnnotationEntry::class, KtIfExpression::class, KtWhenCondition::class) == null
|
||||
it?.psi?.parentOfTypes(KtAnnotationEntry::class, KtValVarKeywordOwner::class) == null
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// OUT_OF_CODE_BLOCK: FALSE
|
||||
// OUT_OF_CODE_BLOCK: TRUE
|
||||
class Test {
|
||||
val q = "aasdf<caret>"
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
fun foo(s: String): Int {
|
||||
return when (s) {
|
||||
"hello" -> 0
|
||||
"<caret>hello" -> 1
|
||||
"<caret>ello" -> 1
|
||||
else -> 42
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user