gerbil
gerbil copied to clipboard
Compiler rejects _ as case-lambda parameter
The following form is valid at the REPL, but causes the compiler to blow up:
(def hash-ref-set! (case-lambda ((h k v) (hash-put! h k v)) ((h k _ v) (hash-put! h k v))))
Compiler error:
*** ERROR IN gxc#generate-runtime-call% -- Syntax Error
*** ERROR IN ?
--- Syntax Error at compile: Cannot compile reference to uninterned identifier
... form: #f
Workaround: renaming _ to _d.