You are not logged in

When keywords bound to syntax in letrec-syntax are also used in the literal identifiers list of one of the contained bindings, the literal identifier may be treated as a variable, rather than a literal.

The attached testcase should more clearly illustrate this. From my reading of r5rs, the output of the cases with and without the "masker" should be equivalent. I have also confirmed this behavior with MIT Scheme 7.7.1.

I am honestly not sure if this is in fact a bug or just a misunderstanding on my part of r5rs. I have tracked the issue to the call to literalIdentifierEq in SyntaxPattern.translate. If this is indeed a bug, I think the solution may be to have the literal identifiers considered as sharing the scope of the scope outside the pattern scope. I have included a patch that does this.