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

Unified Diff: sdk/lib/_internal/compiler/implementation/resolution/members.dart

Issue 17447003: Correctly type check type variable expressions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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 | sdk/lib/_internal/compiler/implementation/typechecker.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/resolution/members.dart
diff --git a/sdk/lib/_internal/compiler/implementation/resolution/members.dart b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
index 95f6edf66847c00e75b51e90cd6dd3c8bb889abc..5641652bc9be1095eda7ee4c0cd9c2fc26ab6c5c 100644
--- a/sdk/lib/_internal/compiler/implementation/resolution/members.dart
+++ b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
@@ -2104,7 +2104,7 @@ class ResolverVisitor extends MappingVisitor<Element> {
// [resolveSend] to select better warning messages for getters and
// setters.
MessageKind kind = (target == null)
- ? MessageKind.METHOD_NOT_FOUND
+ ? MessageKind.MEMBER_NOT_FOUND
: MessageKind.MEMBER_NOT_STATIC;
return warnAndCreateErroneousElement(node, name, kind,
{'className': receiverClass.name,
@@ -2250,6 +2250,9 @@ class ResolverVisitor extends MappingVisitor<Element> {
assert(enclosingElement.getEnclosingClass() == cls);
compiler.backend.registerClassUsingVariableExpression(cls);
compiler.backend.registerTypeVariableExpression(mapping);
+ // Set the type of the node to [Type] to mark this send as a
+ // type variable expression.
+ mapping.setType(node, compiler.typeClass.computeType(compiler));
} else if (target.impliesType() && !sendIsMemberAccess) {
// Set the type of the node to [Type] to mark this send as a
// type literal.
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/typechecker.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698