wcc: forrange bindings get a per-loop scope; dup binders reject
The TODO(#11) silent-accept of `for (let (a, a) .. xs)` rested on a stale premise -- resolvewalk has per-block scopes since #53 and IS the live w6c_ww checker pass. Bindings now install in a per-LOOP scope (the N_MCASE pattern), so a duplicate name within one pattern errs "redeclared in same scope" (cstage parity via stamptuplebinds' scopedefine-nil check) while sequential same-name loops stay legal. kwtab restores its stated alphabetical order (`import` before `is`, both stages, kinds swapped in lockstep with names).
This commit is contained in:
@@ -24,8 +24,8 @@ static const struct kwent kwtab[] = {
|
||||
{ "fn", TK_FN },
|
||||
{ "for", TK_FOR },
|
||||
{ "if", TK_IF },
|
||||
{ "is", TK_IS },
|
||||
{ "import", TK_USE },
|
||||
{ "is", TK_IS },
|
||||
{ "let", TK_LET },
|
||||
{ "match", TK_MATCH },
|
||||
{ "nil", TK_NIL },
|
||||
|
||||
Reference in New Issue
Block a user