Skip to content

assignableEnvironment

assignableEnvironment(source, target): boolean

assignableEnvironment reports whether every checked expression source can produce can be planned and evaluated by target without being checked again.

target qualifies when it declares every variable with an assignable type, every overload id with the same signature and a runtime binding wherever source has one, every struct type the declarations reach, the same context type, every library source applied, a resource limit no tighter than source’s, and the same evaluation semantics.

The container is not part of this: it resolves names while checking source text, and a checked expression’s names are already resolved. Neither are the checker and parser settings or the cost-estimation settings, which change what a later expression checks to rather than what an already-checked expression evaluates to.

Env

Env

boolean