bug added by ~xerool on ~technomancy/fennel
fnlfmt added by ~xerool on ~technomancy/fennel
bug added by ~xerool on ~technomancy/fennel
fnlfmt added by ~xerool on ~technomancy/fennel
bug added by ~xerool on ~technomancy/fennel
Ticket created by ~xerool on ~technomancy/fennel
The pattern
(where (or [x &as y] [x &as y]))
should compile. Even though the symbol&as
appears in both the patterns,symbols-in-pattern
should probably ignore it, like it does toor
andnil
symbols.We also have the dual issue. If a symbol in
(or)
doesn't appear in all the patterns,case
will never try to bind it, so invalid symbols can be present. Eg, the pattern(where (or &invalid&symbol& or 1))
pattern should not compile.;; should compile but doesn't (case [1] ;; &as is used in every subpattern: does not compile (where (or [x &as y] [x &as y])) y);; shouldn't compile, but does (case 1 ;; (or) sees that `&invalid&symbol&` isn't in all the patterns and never binds it (where (or &invalid&symbol& or 1)) 1)
bug added by ~xerool on ~technomancy/fennel
Ticket created by ~xerool on ~technomancy/fennel
Imagine I have this macro that injects a symbol into its environment.
(macro inject [] `(local foo# 10)) (inject) ;;prints 10, but *should* be `unknown identifier: foo_2_auto` or print `nil` (print foo_2_auto)I'm not an expert on macro hygenics, but in my mental model, I would expect
foo#
to be in scope, but be unnameable and inaccessible. Unexpectedly, if you can predict the generated name, (in this casefoo_2_auto
) you can gain access to the local.