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

Unified Diff: sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart

Issue 11416144: Produce run-time error when type parameters are accessed from static context. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Removed redundant malformed type replacement with dynamic type. Created 8 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
Index: sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart
diff --git a/sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart b/sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart
index 8ed02f216a651145c5214b78c7bee81d36b416e6..63e14f98b8b68d83ea3b786189df6a695c5516bf 100644
--- a/sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart
@@ -365,7 +365,8 @@ class PlaceholderCollector extends Visitor {
Element constructor = treeElements[send];
assert(constructor != null);
assert(send.receiver == null);
- if (constructor is !ErroneousElement) {
+ if (!Elements.isErroneousElement(constructor) &&
ngeoffray 2012/11/27 09:37:35 Can that be !Elements.isUnresolved(constructor) ?
aam-me 2012/11/28 01:49:47 Yes, good idea!
+ !Elements.isMalformedElement(constructor)) {
makeConstructorPlaceholder(node.send.selector, constructor, type);
// TODO(smok): Should this be in visitNamedArgument?
// Field names can be exposed as names of optional arguments, e.g.

Powered by Google App Engine
This is Rietveld 408576698