public interface ITypeComputationResult
getActualExpressionType() or other properties are
queried.
A type computation result distinguishes between return types and actual
types for expressions.
Consider the following scenario:
val x = if (guard) return 'dummy' else 1The return type of the
if expression is the
type Comparable<?> & Serializable while the actual type
of the conditional expression is type int. The first branch
of the condition will never complete normally thus its type is not
considered for the local expression type computation.| Modifier and Type | Method and Description |
|---|---|
LightweightTypeReference |
getActualExpressionType()
Returns the type of the expression (if known).
|
int |
getCheckedConformanceFlags()
Conformance information about the actual expression type and
the expectation.
|
java.util.EnumSet<ConformanceHint> |
getCheckedConformanceHints()
Conformance information about the actual expression type and
the expectation.
|
int |
getConformanceFlags()
Conformance information about the actual expression type and
the expectation.
|
java.util.EnumSet<ConformanceHint> |
getConformanceHints()
Conformance information about the actual expression type and
the expectation.
|
LightweightTypeReference |
getExpectedExpressionType()
Returns the type of the expectation (if any).
|
LightweightTypeReference |
getExpectedReturnType()
Returns the type of the return expectation (if any).
|
XExpression |
getExpression()
The expression that is associated with this result.
|
LightweightTypeReference |
getReturnType()
Returns the return type of the expression (if known).
|
LightweightTypeReference getActualExpressionType()
null.LightweightTypeReference getExpectedExpressionType()
ITypeExpectation instead which carries more information.LightweightTypeReference getReturnType()
null. The return type is different
from the actual type since
its value escapes the current context.LightweightTypeReference getExpectedReturnType()
ITypeExpectation instead which carries more information.XExpression getExpression()
java.util.EnumSet<ConformanceHint> getConformanceHints()
int getConformanceFlags()
java.util.EnumSet<ConformanceHint> getCheckedConformanceHints()
int getCheckedConformanceFlags()