inline to anonymous: wrap code with code block when needed (IDEA-86007)

This commit is contained in:
Anna Kozlova
2012-05-18 15:42:44 +04:00
parent 8aa66c1911
commit 56311ae33e
4 changed files with 71 additions and 3 deletions
@@ -0,0 +1,26 @@
public class Demo {
static class MyParent {
private final String value;
MyParent(String value) {
this.value = value;
}
}
static class MyC<caret>hild extends MyParent {
MyChild(String value) {
super(value);
}
}
public static void main(String[] args) {
String value = "something";
final MyParent p;
if (true)
p = new MyChild(value);
else
p = new MyParent("value");
}
}