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

Unified Diff: runtime/vm/parser.cc

Issue 2916453003: Fix VM to accept literal function type as type bound (fixes #29481). (Closed)
Patch Set: void alone as bound is not accepted Created 3 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/language/language_analyzer2.status » ('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 c5cc870457d1efca83ec37264fff7e6e32a7a5cb..7309990bcb0eae5e79b48a8ca6f0442027079bb5 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -5626,7 +5626,8 @@ void Parser::ParseTypeParameters(bool parameterizing_class) {
// i.e. to the class or function currently being parsed.
// Postpone resolution in order to avoid resolving the owner and its
// type parameters, as they are not fully parsed yet.
- type_parameter_bound = ParseType(ClassFinalizer::kDoNotResolve);
+ type_parameter_bound =
+ ParseTypeOrFunctionType(false, ClassFinalizer::kDoNotResolve);
if (is_lower_bound) {
// TODO(regis): Handle 'super' differently than 'extends' if lower
// bounds make it in the final specification and if run time support
« no previous file with comments | « no previous file | tests/language/language_analyzer2.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698