cast conversion java 7 (IDEA-96213) [Roma]

(cherry picked from commit d433089be2856a9c3ae05c10daeeb12736d13023)
This commit is contained in:
anna
2012-11-30 12:04:44 +01:00
parent 1af524b889
commit 8d44b61a55
2 changed files with 6 additions and 2 deletions

View File

@@ -115,8 +115,8 @@ public class TypeConversionUtil {
final PsiClass psiClass = classType.resolve();
if (psiClass == null || psiClass instanceof PsiTypeParameter) return false;
final PsiClassType boxedType = ((PsiPrimitiveType)toType).getBoxedType(psiClass.getManager(), psiClass.getResolveScope());
if (boxedType != null) {
return isAssignable(fromType, boxedType);
if (boxedType != null && isAssignable(fromType, boxedType)) {
return true;
}
}
return fromTypeRank == toTypeRank ||

View File

@@ -90,4 +90,8 @@ class C {
}
void m(int i) { }
void asLongs(Integer i) {
long l = (long) i;
}
}