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 theif expressionis the typeComparable<?> & Serializablewhile the actual type of the conditional expression is typeint. 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.
|
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.
|
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()
EnumSet<ConformanceHint> getConformanceHints()
int getConformanceFlags()
EnumSet<ConformanceHint> getCheckedConformanceHints()
int getCheckedConformanceFlags()
Copyright © 2015. All Rights Reserved.