use of org.jetbrains.kotlin.resolve.calls.checkers.AdditionalTypeChecker in project kotlin by JetBrains.
the class DataFlowAnalyzer method checkType.
@Nullable
public KotlinType checkType(@Nullable KotlinType expressionType, @NotNull KtExpression expressionToCheck, @NotNull ResolutionContext c, @Nullable Ref<Boolean> hasError) {
if (hasError == null) {
hasError = Ref.create(false);
} else {
hasError.set(false);
}
KtExpression expression = KtPsiUtil.safeDeparenthesize(expressionToCheck);
recordExpectedType(c.trace, expression, c.expectedType);
if (expressionType == null)
return null;
KotlinType result = checkTypeInternal(expressionType, expression, c, hasError);
if (Boolean.FALSE.equals(hasError.get())) {
for (AdditionalTypeChecker checker : additionalTypeCheckers) {
checker.checkType(expression, expressionType, result, c);
}
}
return result;
}
Aggregations