Closed undisbeliever closed 5 years ago
Hmm.
This may seem counter-intuitive, but shadowing is permitted by the language in any new lexical scope introduced. The body of the inline for
is one scope lower than the scope where the iterator is introduced, which is also one scope lower than the function body. The dupe
declared inside the block will shadow the dupe
declared as the iterator, but it is not an error given the way lexical scoping works in Wiz. I don't think this is a bug.
The following code should cause wiz to fail with a
redefinition of symbol
error. Instead it allows thedupe
variable to be overridden.