Skip to content

Commit f46d3cf

Browse files
committed
[GR-20446] Remove “shadowing outer local variable” warning.
PullRequest: truffleruby/1244
2 parents 58c8c8b + 8aa4e88 commit f46d3cf

File tree

3 files changed

+1
-8
lines changed

3 files changed

+1
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ Bug fixes:
6161
* Fixed enumeration issue in `ENV.{select, filter}`.
6262
* Fixed `Complex` and `Rational` should be frozen after initializing.
6363
* Fixed `printf` should raise error when not enough arguments for positional argument.
64+
* Removed "shadowing outer local variable" warning.
6465

6566
Compatibility:
6667

spec/tags/language/variables_tags.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/main/java/org/truffleruby/parser/parser/ParserSupport.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1494,13 +1494,6 @@ public String shadowing_lvar(String name) {
14941494
if (current.exists(name) >= 0) {
14951495
yyerror("duplicated argument name");
14961496
}
1497-
1498-
if (warnings.isVerbose() && current.isDefined(name) >= 0) {
1499-
warnings.warning(
1500-
file,
1501-
lexer.getPosition().toSourceSection(lexer.getSource()).getStartLine(),
1502-
"shadowing outer local variable - " + name);
1503-
}
15041497
} else if (current.exists(name) >= 0) {
15051498
yyerror("duplicated argument name");
15061499
}

0 commit comments

Comments
 (0)