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

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

Issue 19097003: Support new malformed types semantics. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix unittests. Created 7 years, 5 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
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 d816a0be085b4ba2b6b46f200778ec015f20d5dd..c7c7ec2a89ea7151d0cd18b289456364ce84403e 100644
--- a/sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart
@@ -310,7 +310,7 @@ class PlaceholderCollector extends Visitor {
if (element.getLibrary().isPlatformLibrary && !element.isTopLevel()) {
return;
}
- if (element == compiler.types.dynamicType.element) {
+ if (element == compiler.dynamicClass) {
internalError(
'Should never make element placeholder for dynamic type element',
node: node);
@@ -365,7 +365,7 @@ class PlaceholderCollector extends Visitor {
visitNewExpression(NewExpression node) {
Send send = node.send;
- InterfaceType type = treeElements.getType(node);
+ DartType type = treeElements.getType(node);
assert(type != null);
Element constructor = treeElements[send];
assert(constructor != null);
@@ -481,7 +481,7 @@ class PlaceholderCollector extends Visitor {
// Corner case: dart:core type with a prefix.
// Most probably there are some additional problems with
// coreLibPrefix.topLevels.
- if (!identical(type.element, compiler.types.dynamicType.element)) {
+ if (!type.treatAsDynamic) {
makeTypePlaceholder(node.typeName, type);
} else {
if (!isDynamicType(node)) makeUnresolvedPlaceholder(node.typeName);

Powered by Google App Engine
This is Rietveld 408576698