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

Unified Diff: runtime/vm/parser.cc

Issue 985203002: Allow direct access to type parameters from factory (issue 22700). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 9 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_analyzer.status » ('j') | 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 44338)
+++ runtime/vm/parser.cc (working copy)
@@ -10710,7 +10710,7 @@
if (primary_node->primary().IsFunction()) {
left = LoadClosure(primary_node);
} else if (primary_node->primary().IsTypeParameter()) {
- if (current_function().is_static()) {
+ if (ParsingStaticMember()) {
const String& name = String::ZoneHandle(Z,
TypeParameter::Cast(primary_node->primary()).name());
ReportError(primary_pos,
@@ -10796,7 +10796,7 @@
ASSERT(!type.IsMalformed());
array = new(Z) TypeNode(primary_pos, type);
} else if (primary_node->primary().IsTypeParameter()) {
- if (current_function().is_static()) {
+ if (ParsingStaticMember()) {
const String& name = String::ZoneHandle(Z,
TypeParameter::Cast(primary_node->primary()).name());
ReportError(primary_pos,
@@ -10864,7 +10864,7 @@
} else if (primary_node->primary().IsTypeParameter()) {
const String& name = String::ZoneHandle(Z,
TypeParameter::Cast(primary_node->primary()).name());
- if (current_function().is_static()) {
+ if (ParsingStaticMember()) {
// Treat as this.T(), because T is in scope.
ReportError(primary_pos,
"cannot access type parameter '%s' "
@@ -10910,7 +10910,7 @@
ASSERT(!type.IsMalformed());
left = new(Z) TypeNode(primary_pos, type);
} else if (primary_node->primary().IsTypeParameter()) {
- if (current_function().is_static()) {
+ if (ParsingStaticMember()) {
const String& name = String::ZoneHandle(Z,
TypeParameter::Cast(primary_node->primary()).name());
ReportError(primary_pos,
« no previous file with comments | « no previous file | tests/language/language_analyzer.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698