Lines 253-261
Link Here
|
253 |
} |
253 |
} |
254 |
if (receiverType == null) { |
254 |
if (receiverType == null) { |
255 |
hasError = true; |
255 |
hasError = true; |
256 |
} else if (((ReferenceBinding) receiverType).isFinal() && this.anonymousType != null) { |
256 |
} else if (((ReferenceBinding) receiverType).isFinal()) { |
257 |
if (!receiverType.isEnum()) { |
257 |
if (this.anonymousType != null) { |
258 |
scope.problemReporter().anonymousClassCannotExtendFinalClass(type, receiverType); |
258 |
if (!receiverType.isEnum()) { |
|
|
259 |
scope.problemReporter().anonymousClassCannotExtendFinalClass(type, receiverType); |
260 |
} |
261 |
} else if (!receiverType.canBeInstantiated()) { |
262 |
scope.problemReporter().cannotInstantiate(type, receiverType); |
263 |
return this.resolvedType = receiverType; |
259 |
} |
264 |
} |
260 |
hasError = true; |
265 |
hasError = true; |
261 |
} |
266 |
} |
Lines 290-300
Link Here
|
290 |
if (hasError) return this.resolvedType = receiverType; |
295 |
if (hasError) return this.resolvedType = receiverType; |
291 |
if (this.anonymousType == null) { |
296 |
if (this.anonymousType == null) { |
292 |
// qualified allocation with no anonymous type |
297 |
// qualified allocation with no anonymous type |
293 |
ReferenceBinding allocationType = (ReferenceBinding) receiverType; |
|
|
294 |
if (!receiverType.canBeInstantiated()) { |
298 |
if (!receiverType.canBeInstantiated()) { |
295 |
scope.problemReporter().cannotInstantiate(type, receiverType); |
299 |
scope.problemReporter().cannotInstantiate(type, receiverType); |
296 |
return this.resolvedType = receiverType; |
300 |
return this.resolvedType = receiverType; |
297 |
} |
301 |
} |
|
|
302 |
ReferenceBinding allocationType = (ReferenceBinding) receiverType; |
298 |
if ((this.binding = scope.getConstructor(allocationType, argumentTypes, this)).isValidBinding()) { |
303 |
if ((this.binding = scope.getConstructor(allocationType, argumentTypes, this)).isValidBinding()) { |
299 |
if (isMethodUseDeprecated(binding, scope)) { |
304 |
if (isMethodUseDeprecated(binding, scope)) { |
300 |
scope.problemReporter().deprecatedMethod(this.binding, this); |
305 |
scope.problemReporter().deprecatedMethod(this.binding, this); |