mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
type migration: do not search for conversion when types are convertible (IDEA-117634)
This commit is contained in:
+3
-1
@@ -464,7 +464,9 @@ class TypeMigrationStatementProcessor extends JavaRecursiveElementVisitor {
|
||||
|
||||
case TypeInfection.RIGHT_INFECTED:
|
||||
PsiType psiType = migrationType != null ? migrationType : right.getType();
|
||||
if (psiType != null && declarationType != null && !myLabeler.addMigrationRoot(variable, psiType, myStatement, TypeConversionUtil.isAssignable(declarationType, psiType), true)) {
|
||||
if (psiType != null && declarationType != null &&
|
||||
!myLabeler.addMigrationRoot(variable, psiType, myStatement, TypeConversionUtil.isAssignable(declarationType, psiType), true) &&
|
||||
!TypeConversionUtil.isAssignable(left.getType(), psiType)) {
|
||||
myLabeler.convertExpression(value, psiType, left.getType(), isCovariantPosition);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user