-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ast/compile: don't error on unused declared+generated vars (every) (#…
…4421) When compiling modules containing `every v in vs { ... }`, it will get rewritten to `every __local0__, v in vs { ... }`. Sending that module through the compiler _again_, it will complain about the generated var being declared (via every, it declares its key and val variables) but unused. Now, we'll check if the original variable was already a generated variable, and suppress the error in that case. Fixes #4420. Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
- Loading branch information
Showing
2 changed files
with
29 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters