IDEA-110479 inferred var types inside gstring injections

This commit is contained in:
Max Medvedev
2013-07-12 19:18:18 +04:00
parent b0128e407a
commit 5dd900e015
2 changed files with 17 additions and 1 deletions
@@ -338,6 +338,6 @@ public class GrClosableBlockImpl extends GrBlockImpl implements GrClosableBlock
@Override
public boolean isTopControlFlowOwner() {
return true;
return !(getParent() instanceof GrStringInjection);
}
}
@@ -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)
}
}