Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/bringVariableIntoScope/beforeResourceVariable.java
Anna.Kozlova f253087643 bring var to scope: disabled for resource variables (IDEA-180436)
EA-61004 - assert: BringVariableIntoScopeFix.invoke
2017-10-12 19:38:49 +02:00

25 lines
370 B
Java

// "Bring 'Resource r' into scope" "false"
class IDEA121153 {
String foo()
{
try (Resource r = getResource()) {
}
return <caret>r.get();
}
public Resource getResource() {
return new Resource();
}
class Resource implements AutoCloseable{
@Override
public void close() {
}
public String get() {
return "";
}
}
}