← All docs
settype() — internals
Compiler internals for settype(): lowering path, type checks, and runtime helpers.
settype() — internals
Where it lives
- Signature:
src/builtins/types/settype.rs - Lowering:
src/codegen/lower_inst/builtins/types.rs:25 (lower_settype) - Function symbol:
lower_settype()
Lowering notes
- Lowers
settype($local, "type")by mutating the resolved local slot and returning true.
Runtime helpers
No direct __rt_* helpers captured — the lowering is inlined or routes through another builtin.
Signature summary
function settype(mixed $var, string $type): bool
What the type checker enforces
- Arity: takes exactly 2 arguments.
- By-reference parameters:
$var.
Eval interpreter (magician)
- Declaration:
crates/elephc-magician/src/interpreter/builtins/types/settype.rs(eval_builtin!) - Dispatch hooks:
values - By-reference parameters:
$var.