§5.4.(a) General syntax for guards

A guard is declared using the keyword when followed by a boolean expression in parentheses:

when (predicateExpression)

Depending on the kind of guard different objects are in scope using special identifiers like this, base.
Any predicate expression that evaluates to true enables the callin binding(s) to which it applies. Evaluation to false disables the callin binding(s).