Class ExpressionIsBooleanResultOrError

All Implemented Interfaces:
BiConsumer<EK9Parser.ExpressionContext, String>

final class ExpressionIsBooleanResultOrError extends TypedSymbolAccess implements BiConsumer<EK9Parser.ExpressionContext, String>
Checks that an expression resolves to a result of the exact type Boolean, emitting ONLY_COMPATIBLE_WITH_BOOLEAN otherwise. The statement word (for example 'assert' or 'require') is woven into the error message so the same check serves each boolean-result statement.

Tolerant of the developer's code being in error: if the expression has no recorded symbol or no resolved type yet (other errors will already have been emitted), nothing is reported here.