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

Unified Diff: pkg/compiler/lib/src/resolution/members.dart

Issue 816663002: dart2js: Fix crash with reference to type literal in static context. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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 | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/members.dart
diff --git a/pkg/compiler/lib/src/resolution/members.dart b/pkg/compiler/lib/src/resolution/members.dart
index 80d5b8246f3ac8f2960db028144e5d6f197d1b5b..2a394872c0f56b0aa346934b1a3deb2a268906b9 100644
--- a/pkg/compiler/lib/src/resolution/members.dart
+++ b/pkg/compiler/lib/src/resolution/members.dart
@@ -2761,6 +2761,11 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> {
} else if (target.isTypeVariable) {
ClassElement cls = target.enclosingClass;
assert(enclosingElement.enclosingClass == cls);
+ if (Elements.isInStaticContext(enclosingElement)) {
+ compiler.reportError(node,
+ MessageKind.TYPE_VARIABLE_WITHIN_STATIC_MEMBER,
+ {'typeVariableName': node.selector});
+ }
registry.registerClassUsingVariableExpression(cls);
registry.registerTypeVariableExpression();
// Set the type of the node to [Type] to mark this send as a
« no previous file with comments | « no previous file | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698