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
The same thing happens with the terms that desugar to matches, like fold and open, but not with pattern matching functions, since they hold their variables differently.
Reproducing the behavior
Consider this program
Here,
x.head
andx.tail
should refer to the variables bound by the elimination ofList/Cons
. Instead they resolved as references to the two functions.We can reproduce this by running the program, which results in
λa (a x.head x.tail)
instead oλa (a 1 [])
which we get by callingx
any other name.This happens because
resolve_refs
is called beforefix_match_terms
and so the names bound by each match arm haven't been generated yet.System Settings
Bend commit 45839a7
Additional context
No response
The text was updated successfully, but these errors were encountered: