mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-110479 inferred var types inside gstring injections
This commit is contained in:
+1
-1
@@ -338,6 +338,6 @@ public class GrClosableBlockImpl extends GrBlockImpl implements GrClosableBlock
|
||||
|
||||
@Override
|
||||
public boolean isTopControlFlowOwner() {
|
||||
return true;
|
||||
return !(getParent() instanceof GrStringInjection);
|
||||
}
|
||||
}
|
||||
|
||||
+16
@@ -1647,4 +1647,20 @@ def foo(x) {
|
||||
''', PsiMethod)
|
||||
|
||||
}
|
||||
|
||||
void testInferredTypeInsideGStringInjection() {
|
||||
resolveByText('''\
|
||||
class A {}
|
||||
class B extends A {
|
||||
String bar() {'bar'}
|
||||
}
|
||||
|
||||
def foo(A b) {
|
||||
if (b instanceof B) {
|
||||
doSomethingElse("Message: ${b.ba<caret>r()}")
|
||||
|
||||
}
|
||||
}
|
||||
''', PsiMethod)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user