EA-33078 - assert: TypeMigrationLabeler.migrateExpressionType

skip expressions with null type
This commit is contained in:
Anna Kozlova
2012-02-01 11:59:40 +04:00
parent 1c999ff146
commit 955ab350a1
2 changed files with 2 additions and 4 deletions
@@ -249,9 +249,7 @@ public class TypeMigrationLabeler {
public void migrateExpressionType(final PsiExpression expr, final PsiType migrationType, final PsiElement place, boolean alreadyProcessed, final boolean isCovariant) {
PsiType originalType = expr.getType();
LOG.assertTrue(originalType != null);
if (originalType.equals(migrationType)) return;
if (originalType == null || originalType.equals(migrationType)) return;
if (originalType.equals(PsiType.NULL)) {
if (migrationType instanceof PsiPrimitiveType) {
@@ -85,7 +85,7 @@ public class RootTypeConversionRule extends TypeConversionRule {
}
if (!originalType.equals(type)) {
labeler.migrateExpressionType(actualParams[i], methodTypeParamsSubstitutor.substitute(type), context, originalType.equals(type), true);
labeler.migrateExpressionType(actualParams[i], methodTypeParamsSubstitutor.substitute(type), context, false, true);
}
}
}