It is a compile-time error if e refers to the name v or the name v=. #6871
Labels
area-test
Cross-cutting test issues (use area- labels for specific failures; not used for package:test).
closed-obsolete
Closed as the reported issue is no longer relevant
P2
A bug or feature request we're likely to work on
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
See latest spec draft.
FAILED: dartc-none release_ia32 language/block_scope_test
Expected: pass
Actual: fail
stdout:
(Ignoring unrecognized flag: --package-root=xcodebuild/ReleaseIA32/packages/)
stderr:
ERROR|RESOLVER|VARIABLE_REFERENCES_SAME_NAME_IN_INITIALIZER|file:/Users/scheglov/Source/Dart/dart/tests/language/block_scope_test.dart|8|13|3|Initializer of variable "foo" cannot refer to the name "foo"
7: void testShadowingScope1() {
8: var foo = foo();
~~~
ERROR|RESOLVER|VARIABLE_REFERENCES_SAME_NAME_IN_INITIALIZER|file:/Users/scheglov/Source/Dart/dart/tests/language/block_scope_test.dart|14|15|3|Initializer of variable "foo" cannot refer to the name "foo"
13: {
14: var foo = foo() + 444;
~~~
ERROR|RESOLVER|VARIABLE_REFERENCES_SAME_NAME_IN_INITIALIZER|file:/Users/scheglov/Source/Dart/dart/tests/language/block_scope_test.dart|46|17|3|Initializer of variable "foo" cannot refer to the name "foo"
45: if (true) {
46: var foo = foo() + 444;
~~~
ERROR|RESOLVER|VARIABLE_REFERENCES_SAME_NAME_IN_INITIALIZER|file:/Users/scheglov/Source/Dart/dart/tests/language/block_scope_test.dart|53|17|3|Initializer of variable "bar" cannot refer to the name "bar"
52: if (true) {
53: var bar = bar() + 444;
~~~
Compilation failed with 4 problems.
Command line: xcodebuild/ReleaseIA32/analyzer/bin/dart_analyzer --ignore-unrecognized-flags --package-root=xcodebuild/ReleaseIA32/packages/ --error_format machine /Users/scheglov/Source/Dart/dart/tests/language/block_scope_test.dart
The text was updated successfully, but these errors were encountered: