mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
enable var type change when method is called on qualifier (IDEA-190067)
This commit is contained in:
+1
-1
@@ -103,8 +103,8 @@ public class VariableTypeFromCallFix implements IntentionAction {
|
||||
final PsiClassType appropriateVarType = JavaPsiFacade.getElementFactory(expression.getProject()).createType(varClass, psiSubstitutor);
|
||||
if (!varType.equals(appropriateVarType)) {
|
||||
actions.add(new VariableTypeFromCallFix(appropriateVarType, (PsiVariable)resolved));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// "Change field 'f' type to 'java.lang.String'" "true"
|
||||
class Test {
|
||||
String f;
|
||||
void foo(A a) {
|
||||
a.foo(f);
|
||||
}
|
||||
}
|
||||
|
||||
class A {
|
||||
void foo(String s) {}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// "Change field 'f' type to 'java.lang.String'" "true"
|
||||
class Test {
|
||||
int f;
|
||||
void foo(A a) {
|
||||
a.foo(<caret>f);
|
||||
}
|
||||
}
|
||||
|
||||
class A {
|
||||
void foo(String s) {}
|
||||
}
|
||||
Reference in New Issue
Block a user