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
{{ message }}
Repository navigation
REPL: a call on a later line gets no instance of a generic function from an earlier line #354
A generic function gets one instance per set of argument types it's called with, compiled with its declaration. A function declared on an earlier REPL line was compiled already, so a later line's call uses its own body, which picks its overloads as the program runs. With an Any argument the call is typed by the overloads that take Any, while the body picks by the value:
In one batch this prints fallback (#353). The fix is for a later line to compile the instances it needs of an earlier line's function, which needs that function's body and analysis to outlive its batch.
Activity