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

Unified Diff: runtime/vm/parser.cc

Issue 76963003: Fix crash evaluating metadata with super in a const constructor argument. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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_constructor_arguments_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 1bde3836f6d569ee4813a99eab900378b8e44c4c..ec66834826f717415247e292747f4a0a6c7ad090 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -10299,6 +10299,9 @@ AstNode* Parser::ParsePrimary() {
} else if (CurrentToken() == Token::kHASH) {
primary = ParseSymbolLiteral();
} else if (CurrentToken() == Token::kSUPER) {
+ if (parsing_metadata_) {
+ ErrorMsg("cannot access superclass from metadata");
+ }
if (current_function().is_static()) {
ErrorMsg("cannot access superclass from static method");
}
« no previous file with comments | « no previous file | tests/lib/mirrors/metadata_constructor_arguments_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698