Lines 245-260
Link Here
|
245 |
return true; |
245 |
return true; |
246 |
|
246 |
|
247 |
} |
247 |
} |
248 |
} else if (use15specifics) { // unboxing - only exact match is allowed |
248 |
} else if (use15specifics && env.computeBoxingType(expressionType).isCompatibleWith(castType)) { |
249 |
if (env.computeBoxingType(expressionType) == castType) { |
249 |
// unboxing |
250 |
// TODO (philippe) could tagAsUnnecessaryCast(scope, castType); |
250 |
tagAsUnnecessaryCast(scope, castType); |
251 |
return true; |
251 |
return true; |
252 |
} |
|
|
253 |
} |
252 |
} |
254 |
return false; |
253 |
return false; |
255 |
} else if (use15specifics && expressionType.isBaseType()) { // boxing - only exact match is allowed |
254 |
} else if (use15specifics && expressionType.isBaseType()) { // boxing - only exact match is allowed |
256 |
if (env.computeBoxingType(castType) == expressionType) { |
255 |
if (env.computeBoxingType(castType) == expressionType) { |
257 |
// TODO (philippe) could tagAsUnnecessaryCast(scope, castType); |
256 |
tagAsUnnecessaryCast(scope, castType); |
258 |
return true; |
257 |
return true; |
259 |
} |
258 |
} |
260 |
} |
259 |
} |