ReplaceCastWithVariableAction: support parentheses

This commit is contained in:
Tagir Valeev
2018-07-10 14:13:47 +07:00
parent 16f7a6f8ea
commit e3b4dbaac1
3 changed files with 16 additions and 7 deletions
@@ -1,4 +1,4 @@
// "Replace '(FooBar)foo' with 'foobar'" "true"
// "Replace '(FooBar)(foo)' with 'foobar'" "true"
class FooBar {
public int baz;
@@ -1,4 +1,4 @@
// "Replace '(FooBar)foo' with 'foobar'" "true"
// "Replace '(FooBar)(foo)' with 'foobar'" "true"
class FooBar {
public int baz;
@@ -6,6 +6,6 @@ class FooBar {
int method(Object foo) {
foobar = null;
FooBar foobar = (FooBar)foo;
return ((FooBar<caret>)foo).baz;
return ((FooBar<caret>)(foo)).baz;
}
}