| Index: sdk/lib/_internal/compiler/implementation/dart_types.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/dart_types.dart b/sdk/lib/_internal/compiler/implementation/dart_types.dart
|
| index f301f9b04ba697240f45788213cb15ed98e001f5..7256394f9c3e22e480db68a745df3ed4582d3ec4 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/dart_types.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/dart_types.dart
|
| @@ -93,6 +93,10 @@ abstract class DartType {
|
| /// Returns the raw version of this type.
|
| DartType asRaw() => this;
|
|
|
| + /// Is [: true :] if this type has no non-dynamic type arguments.
|
| + bool get treatAsRaw => isRaw;
|
| +
|
| +
|
| /// Is [: true :] if this type should be treated as the dynamic type.
|
| bool get treatAsDynamic => false;
|
|
|
| @@ -424,6 +428,14 @@ abstract class GenericType extends DartType {
|
| bool get isRaw => typeArguments.isEmpty || identical(this, element.rawType);
|
|
|
| GenericType asRaw() => element.rawType;
|
| +
|
| + bool get treatAsRaw {
|
| + if (isRaw) return true;
|
| + for (Link<DartType> link = typeArguments; !link.isEmpty; link = link.tail) {
|
| + if (!link.head.treatAsDynamic) return false;
|
| + }
|
| + return true;
|
| + }
|
| }
|
|
|
| class InterfaceType extends GenericType {
|
|
|