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

Unified Diff: runtime/vm/parser.cc

Issue 286903020: Fix crash when parsing metadata that refers to a static getter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | tests/lib/mirrors/metadata_allowed_values_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 66018e5894c60eaf9bf31b839a26b2fd88bd4ed3..699206e2660d295c96a4693494e30a1d236a04b6 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -9171,6 +9171,11 @@ bool Parser::ResolveIdentInLocalScope(intptr_t ident_pos,
// be found.
AstNode* receiver = NULL;
const bool kTestOnly = true;
+ if (parsing_metadata_) {
+ ErrorMsg(ident_pos,
+ "'%s' is not a compile-time constant",
+ ident.ToCString());
+ }
if (!current_function().is_static() &&
(LookupReceiver(current_block_->scope, kTestOnly) != NULL)) {
receiver = LoadReceiver(ident_pos);
« no previous file with comments | « no previous file | tests/lib/mirrors/metadata_allowed_values_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698