/** Second part of resolving that may happen multiple times during overload resolution. */ boolean resolvePart2(ResolutionState state) { // TODO: all information persisted during this method may need to be stored per targetType? if (state.isDiamond) { ReferenceBinding genericType = ((ParameterizedTypeBinding) this.resolvedType).genericType(); TypeBinding [] inferredTypes = inferElidedTypes((ParameterizedTypeBinding) this.resolvedType, this.resolvedType.enclosingType(), state.argumentTypes, state.scope); if (inferredTypes == null) { if (!state.diamondNeedsDeferring) { state.scope.problemReporter().cannotInferElidedTypes(this); state.hasReportedError = true; this.resolvedType = null; } else { state.cannotInferDiamond = true; // defer reporting } return false; } this.resolvedType = this.type.resolvedType = state.scope.environment().createParameterizedType(genericType, inferredTypes, ((ParameterizedTypeBinding) this.resolvedType).enclosingType()); state.cannotInferDiamond = false; } ReferenceBinding receiverType = (ReferenceBinding) this.resolvedType; this.binding = findConstructorBinding(state.scope, this, receiverType, state.argumentTypes); return true; }
/** Second part of resolving that may happen multiple times during overload resolution. */ boolean resolvePart2(ResolutionState state) { // TODO: all information persisted during this method may need to be stored per targetType? if (state.isDiamond) { ReferenceBinding genericType = ((ParameterizedTypeBinding) this.resolvedType).genericType(); TypeBinding [] inferredTypes = inferElidedTypes((ParameterizedTypeBinding) this.resolvedType, this.resolvedType.enclosingType(), state.argumentTypes, state.scope); if (inferredTypes == null) { if (!state.diamondNeedsDeferring) { state.scope.problemReporter().cannotInferElidedTypes(this); state.hasReportedError = true; this.resolvedType = null; } else { state.cannotInferDiamond = true; // defer reporting } return false; } this.resolvedType = this.type.resolvedType = state.scope.environment().createParameterizedType(genericType, inferredTypes, ((ParameterizedTypeBinding) this.resolvedType).enclosingType()); state.cannotInferDiamond = false; } ReferenceBinding receiverType = (ReferenceBinding) this.resolvedType; this.binding = findConstructorBinding(state.scope, this, receiverType, state.argumentTypes); return true; }
/** Second part of resolving that may happen multiple times during overload resolution. */ boolean resolvePart2(ResolutionState state) { // TODO: all information persisted during this method may need to be stored per targetType? if (state.isDiamond) { ReferenceBinding genericType = ((ParameterizedTypeBinding) this.resolvedType).genericType(); TypeBinding [] inferredTypes = inferElidedTypes((ParameterizedTypeBinding) this.resolvedType, this.resolvedType.enclosingType(), state.argumentTypes, state.scope); if (inferredTypes == null) { if (!state.diamondNeedsDeferring) { state.scope.problemReporter().cannotInferElidedTypes(this); state.hasReportedError = true; this.resolvedType = null; } else { state.cannotInferDiamond = true; // defer reporting } return false; } this.resolvedType = this.type.resolvedType = state.scope.environment().createParameterizedType(genericType, inferredTypes, ((ParameterizedTypeBinding) this.resolvedType).enclosingType()); state.cannotInferDiamond = false; } ReferenceBinding receiverType = (ReferenceBinding) this.resolvedType; this.binding = findConstructorBinding(state.scope, this, receiverType, state.argumentTypes); return true; }
resolvePolyExpressionArguments(this, this.binding, this.argumentTypes, scope); } else { this.binding = findConstructorBinding(scope, this, (ReferenceBinding) this.resolvedType, this.argumentTypes);
resolvePolyExpressionArguments(this, this.binding, this.argumentTypes, scope); } else { this.binding = findConstructorBinding(scope, this, (ReferenceBinding) this.resolvedType, this.argumentTypes);
resolvePolyExpressionArguments(this, this.binding, this.argumentTypes, scope); } else { this.binding = findConstructorBinding(scope, this, (ReferenceBinding) this.resolvedType, this.argumentTypes);
this.binding = findConstructorBinding(scope, this, (ReferenceBinding) this.resolvedType, this.argumentTypes);
this.binding = findConstructorBinding(scope, this, (ReferenceBinding) this.resolvedType, this.argumentTypes);