You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(check): occurs check in unify (reject infinite types)
unify previously bound a type variable to any type without checking whether
the variable occurred inside it, so `'a = 'a -> Int` (or `'a = Echo 'a`) was
accepted and made `resolve` recurse forever. Adds `CheckEnv::occurs(id, ty)`,
which walks the resolved type through every former (Fun, Dist, List, Set,
Option, Map, Result, Tuple, Echo, EchoR), and refuses the binding with a clear
error when the variable occurs.
3 new tests (infinite via Fun, infinite via Echo, distinct-vars-still-unify);
41 bet-check tests pass; lib is clippy-clean.
First half of the checker-hardening pass; real type schemes (generalise /
instantiate at let-boundaries) follow.
https://claude.ai/code/session_01QGi8GND5yNWgDyfReVEPYs
0 commit comments