Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(241)

Unified Diff: sdk/lib/_internal/compiler/implementation/warnings.dart

Issue 24488004: Implement correct scoping rules for variables. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/compiler/implementation/warnings.dart
diff --git a/sdk/lib/_internal/compiler/implementation/warnings.dart b/sdk/lib/_internal/compiler/implementation/warnings.dart
index 7e641bf8e24746377dd9696f4a5cca16abc41801..0cffa3ea82b6e4f29da854358e875c1ae30e9aa2 100644
--- a/sdk/lib/_internal/compiler/implementation/warnings.dart
+++ b/sdk/lib/_internal/compiler/implementation/warnings.dart
@@ -809,12 +809,12 @@ Length: #{length}''');
const MessageKind(
"Error: Top-level variable cannot be declared static.");
- static const MessageKind REFERENCE_IN_INITIALIZATION = const MessageKind(
- "Error: Variable '#{variableName}' is referenced during its "
- "initialization.",
- howToFix: "If you are trying to reference a shadowed variable, rename"
+ static const MessageKind ACCESS_BEFORE_INITIALIZATION = const MessageKind(
+ "Error: Variable '#{variableName}' is referenced before its "
+ "initialization.",
+ howToFix: "If you are trying to reference a shadowed variable, rename"
" one of the variables.",
- examples: const ["""
+ examples: const ["""
foo(t) {
var t = t;
return t;

Powered by Google App Engine
This is Rietveld 408576698