@NonNullByDefault public class ClosureWithExpectationHelper extends AbstractClosureTypeHelper
ClosureWithoutExpectationHelper
Modifier | Constructor and Description |
---|---|
protected |
ClosureWithExpectationHelper(XClosure closure,
JvmOperation operation,
ITypeExpectation expectation,
ITypeComputationState state) |
Modifier and Type | Method and Description |
---|---|
protected void |
computeTypes() |
protected ITypeComputationState |
getClosureBodyTypeComputationState(ITypeAssigner typeAssigner) |
FunctionTypeReference |
getExpectedClosureType()
This method is only public for testing purpose.
|
JvmOperation |
getOperation()
This method is only public for testing purpose.
|
protected FunctionTypeReference |
initKnownClosureType(JvmType type,
JvmOperation operation) |
protected boolean |
isImplicitReturn(XExpression expression) |
protected void |
markCompatibleParameterList() |
protected void |
markIncompatible() |
protected void |
markIncompatibleParameterList() |
protected void |
markRawCompatible() |
protected void |
markUncheckedValid() |
protected void |
prepareComputation() |
protected void |
prepareResultType() |
protected ConformanceHint |
processExpressionType(ITypeComputationResult expressionResult)
Returns
true if the expression result is definitely incompatible to the expected type. |
deferredBindTypeArgument, getClosure, getExpectation, getServices, getState
protected ClosureWithExpectationHelper(XClosure closure, JvmOperation operation, ITypeExpectation expectation, ITypeComputationState state)
public JvmOperation getOperation()
AbstractClosureTypeHelper
getOperation
in class AbstractClosureTypeHelper
public FunctionTypeReference getExpectedClosureType()
AbstractClosureTypeHelper
getExpectedClosureType
in class AbstractClosureTypeHelper
protected void computeTypes()
computeTypes
in class AbstractClosureTypeHelper
protected void markUncheckedValid()
protected void markIncompatibleParameterList()
protected void markCompatibleParameterList()
protected void markIncompatible()
protected void markRawCompatible()
protected void prepareComputation()
protected void prepareResultType()
protected FunctionTypeReference initKnownClosureType(JvmType type, JvmOperation operation)
protected ITypeComputationState getClosureBodyTypeComputationState(ITypeAssigner typeAssigner)
@Nullable protected ConformanceHint processExpressionType(ITypeComputationResult expressionResult)
true
if the expression result is definitely incompatible to the expected type.protected boolean isImplicitReturn(@Nullable XExpression expression)