canEvaluate
canEvaluate(
target,expression):boolean
canEvaluate reports whether one particular checked expression can be planned and evaluated by
target. It walks the expression’s checked metadata and confirms target declares, and can
dispatch, every variable, overload, struct type, and field the expression references.
canEvaluate never reparses or rechecks the expression, resolves names, selects overloads, or runs
validators: it treats the expression as already resolved and only asks whether target provides
what it resolved to. It is the check to use for a checked expression whose originating
environment is unknown; when that environment is known to be assignable to target, assignability
has already answered the question.
Parameters
Section titled “Parameters”target
Section titled “target”Env
expression
Section titled “expression”AST
Returns
Section titled “Returns”boolean