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

Unified Diff: runtime/vm/parser.cc

Issue 10447102: Clarify error message when illegally accessing 'this' (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
===================================================================
--- runtime/vm/parser.cc (revision 8126)
+++ runtime/vm/parser.cc (working copy)
@@ -3942,7 +3942,7 @@
const bool kTestOnly = false;
LocalVariable* receiver = LookupReceiver(current_block_->scope, kTestOnly);
if (receiver == NULL) {
- ErrorMsg(token_pos, "illegal access to 'this'");
+ ErrorMsg(token_pos, "illegal implicit access to receiver 'this'");
}
return new LoadLocalNode(token_index_, *receiver);
}
@@ -8163,7 +8163,7 @@
const String& this_name = String::Handle(String::NewSymbol(kThisName));
LocalVariable* local = LookupLocalScope(this_name);
if (local == NULL) {
- ErrorMsg("unexpected use of 'this' in primary expression");
+ ErrorMsg("receiver 'this' is not in scope");
}
primary = new LoadLocalNode(token_index_, *local);
ConsumeToken();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698