Issue #232
resolved
R7RSモードでの syntax-rules の不具合報告になります。
(import (scheme base)) (define-syntax mac-main1 (syntax-rules () ((_ lit x1 y1 z1) (let-syntax ((mac-sub1 (syntax-rules (lit) ((_ x2 y2 z2) (+ x2 y2 z2))))) (mac-sub1 x1 y1 z1))))) (mac-main1 x2 1 2 3) ; => no expansion for (mac-sub1 1 2 3)
マクロで生成した literal と、pattern 変数が同名のときに展開エラーになります。
Ypsilon の syntax-rules stress test を実行してみて気が付きました。
それで、SRFI-149 参照実装の元である
https://github.com/ashinn/chibi-scheme/blob/master/lib/init-7.scm
が更新されていました。
Gauche 用モジュールでも以下のように修正しました。
https://github.com/Hamayama/srfi-149-mod/commit/ac80b9a06dbbfb7f9e007ed6dbb906b3c558f8fa
Comments (3)
-
repo owner -
repo owner -
assigned issue to
-
assigned issue to
-
repo owner - changed status to resolved
Fixing illegal comparison of bound identifier. Fixes
#232→ <<cset 8a4cb80ebf13>>
- Log in to comment
報告ありがとうございます。こちらでも確認しました。