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

Unified Diff: pkg/compiler/lib/src/elements/types.dart

Issue 2852683002: Fix InterfaceType.treatAsRaw (Closed)
Patch Set: Created 3 years, 8 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/compiler/dart2js/kernel/closed_world2_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/elements/types.dart
diff --git a/pkg/compiler/lib/src/elements/types.dart b/pkg/compiler/lib/src/elements/types.dart
index 6e84728e19da76f8102ac9f05b0203ba390667b4..26066158c931f5ba304eb9186fa18347536db482 100644
--- a/pkg/compiler/lib/src/elements/types.dart
+++ b/pkg/compiler/lib/src/elements/types.dart
@@ -115,6 +115,13 @@ class InterfaceType extends DartType {
return this;
}
+ bool get treatAsRaw {
+ for (DartType type in typeArguments) {
+ if (!type.treatAsDynamic) return false;
+ }
+ return true;
+ }
+
@override
R accept<R, A>(DartTypeVisitor visitor, A argument) =>
visitor.visitInterfaceType(this, argument);
« no previous file with comments | « no previous file | tests/compiler/dart2js/kernel/closed_world2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698