mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-230701 IDEA doesn't resolve pattern variable defined in labeled scope
GitOrigin-RevId: afd36dfb5a20200bcab13a0efdc8ddf4884d959e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ff0b24139e
commit
681a58ab7b
+1
-1
@@ -102,7 +102,7 @@ public class PsiLabeledStatementImpl extends CompositePsiElement implements PsiL
|
||||
|
||||
@Override
|
||||
public boolean processDeclarations(@NotNull PsiScopeProcessor processor, @NotNull ResolveState state, PsiElement lastParent, @NotNull PsiElement place) {
|
||||
if (lastParent != null && lastParent.getParent() != this){
|
||||
if (lastParent == null || lastParent.getParent() != this){
|
||||
PsiElement[] children = getChildren();
|
||||
for (PsiElement aChildren : children) {
|
||||
if (!aChildren.processDeclarations(processor, state, null, place)) {
|
||||
|
||||
+8
@@ -117,4 +117,12 @@ class X {
|
||||
}
|
||||
System.out.println("Found: "+s.trim());
|
||||
}
|
||||
|
||||
void testLabel() {
|
||||
Object o = "hello";
|
||||
L0: if(!(o instanceof String s)) {
|
||||
return;
|
||||
}
|
||||
System.out.println(s.length());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user