protected ClosureWithoutExpectationHelper(XClosure closure, ITypeExpectation expectation, ITypeComputationState state) { super(closure, expectation, state); this.functionTypes = getServices().getFunctionTypes(); }
/** * {@inheritDoc} * * @see FunctionTypes#getAsFunctionTypeReference(ParameterizedTypeReference) */ @Override /* @Nullable */ public FunctionTypeReference getAsFunctionTypeReference() { FunctionTypes functionTypes = getServices().getFunctionTypes(); return functionTypes.getAsFunctionTypeReference(this); }
/** * {@inheritDoc} * * @see FunctionTypes#tryConvertToFunctionTypeReference(ParameterizedTypeReference, boolean) */ @Override /* @Nullable */ public FunctionTypeReference tryConvertToFunctionTypeReference(boolean rawType) { FunctionTypes functionTypes = getServices().getFunctionTypes(); return functionTypes.tryConvertToFunctionTypeReference(this, rawType); }
@Override public FunctionTypeKind getFunctionTypeKind() { FunctionTypes functionTypes = getServices().getFunctionTypes(); return functionTypes.getFunctionTypeKind(this); }
public ClosureTypeComputer(XClosure closure, ITypeExpectation expectation, ITypeComputationState state) { this.closure = closure; this.expectation = expectation; this.state = state; this.services = state.getReferenceOwner().getServices(); this.functionTypes = services.getFunctionTypes(); }
protected JvmOperation findImplementingOperation(LightweightTypeReference closureType) { return getTypeComputationServices().getFunctionTypes().findImplementingOperation(closureType); }
if (declaredType != null && !declaredType.isType(Object.class)) { CommonTypeComputationServices services = getState().getReferenceOwner().getServices(); JvmOperation operation = services.getFunctionTypes().findImplementingOperation(declaredType); if (operation == null) { return false;
return; } else { JvmOperation operation = getServices().getFunctionTypes().findImplementingOperation(type); if (operation == null) { error("There is no context to infer the closure's argument types from. Consider typing the arguments or use the closures in a more specific context.",