|
Lines 90-95
Link Here
|
| 90 |
* No need to check for reference to raw type per construction |
90 |
* No need to check for reference to raw type per construction |
| 91 |
*/ |
91 |
*/ |
| 92 |
private TypeBinding internalResolveType(Scope scope, ReferenceBinding enclosingType, boolean checkBounds) { |
92 |
private TypeBinding internalResolveType(Scope scope, ReferenceBinding enclosingType, boolean checkBounds) { |
|
|
93 |
boolean isCompliant17 = scope.compilerOptions().originalSourceLevel >= ClassFileConstants.JDK1_7; |
| 93 |
// handle the error here |
94 |
// handle the error here |
| 94 |
this.constant = Constant.NotAConstant; |
95 |
this.constant = Constant.NotAConstant; |
| 95 |
if ((this.bits & ASTNode.DidResolve) != 0) { // is a shared type reference which was already resolved |
96 |
if ((this.bits & ASTNode.DidResolve) != 0) { // is a shared type reference which was already resolved |
|
Lines 222-229
Link Here
|
| 222 |
} |
223 |
} |
| 223 |
// if missing generic type, and compliance >= 1.5, then will rebuild a parameterized binding |
224 |
// if missing generic type, and compliance >= 1.5, then will rebuild a parameterized binding |
| 224 |
} else if (argLength != typeVariables.length) { // check arity |
225 |
} else if (argLength != typeVariables.length) { // check arity |
| 225 |
scope.problemReporter().incorrectArityForParameterizedType(this, currentType, argTypes); |
226 |
if(isCompliant17 && argLength == 0) { |
| 226 |
return null; |
227 |
if ((this.bits & ASTNode.IsDiamond) ==0) { |
|
|
228 |
scope.problemReporter().incorrectArityForParameterizedType(this, currentType, argTypes); |
| 229 |
return null; |
| 230 |
} |
| 231 |
// argLength = 0 ok if its the diamond case for compliance >= 1.7 |
| 232 |
// also no need to check bounds for such a case |
| 233 |
checkBounds = false; |
| 234 |
} else { |
| 235 |
scope.problemReporter().incorrectArityForParameterizedType(this, currentType, argTypes); |
| 236 |
return null; |
| 237 |
} |
| 227 |
} else if (!currentType.isStatic()) { |
238 |
} else if (!currentType.isStatic()) { |
| 228 |
ReferenceBinding actualEnclosing = currentType.enclosingType(); |
239 |
ReferenceBinding actualEnclosing = currentType.enclosingType(); |
| 229 |
if (actualEnclosing != null && actualEnclosing.isRawType()){ |
240 |
if (actualEnclosing != null && actualEnclosing.isRawType()){ |