dartanalyzer/dart2js disagrees with VM about scoping rules #20074
Labels
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
web-dart2js
Milestone
The following example:
1 doit() {
2 error(error) {
3 print(error);
4 }
5 error('foobar');
6 }
7 main() {
8 doit();
9 }
Results in the following output of dartanalyzer/dart2js/dartvm:
$ dartanalyzer test.dart
Analyzing [test.dart]...
[error] The name 'error' is already defined (/usr/local/google/home/kustermann/test.dart, line 2, col 9)
1 error found.
$ dart2js --out=/tmp/foo.js test.dart
test.dart:2:3:
Error: Duplicate definition of 'error(error){print(error);}'.
error(error) {
^^^^^
test.dart:2:9:
Info: Existing definition of 'error(error){print(error);}'.
error(error) {
^^^^^
Error: Compilation failed.
$ dart test.dart
foobar
Dart-SDK version: 1.6.0-dev.3.0
lrn/ahe/I think that this is a bug in dartanalyzer/dart2js.
The text was updated successfully, but these errors were encountered: