| Index: compiler/java/com/google/dart/compiler/type/Types.java
|
| diff --git a/compiler/java/com/google/dart/compiler/type/Types.java b/compiler/java/com/google/dart/compiler/type/Types.java
|
| index d9d91a065d7f282b77f16cb4039a19a3d192aed7..0cc2c64a0681f4bac88abd2aa9c28cd53229357a 100644
|
| --- a/compiler/java/com/google/dart/compiler/type/Types.java
|
| +++ b/compiler/java/com/google/dart/compiler/type/Types.java
|
| @@ -71,6 +71,20 @@ public class Types {
|
| }
|
|
|
| public Type intersection(List<Type> types) {
|
| + // exclude Dynamic type
|
| + {
|
| + List<Type> newTypes = Lists.newArrayList();
|
| + for (Type type : types) {
|
| + if (TypeKind.of(type) != TypeKind.DYNAMIC) {
|
| + newTypes.add(type);
|
| + }
|
| + }
|
| + types = newTypes;
|
| + }
|
| + // no types, so Dynamic
|
| + if (types.isEmpty()) {
|
| + return typeProvider.getDynamicType();
|
| + }
|
| // prepare all super types
|
| List<List<InterfaceType>> superTypesLists = Lists.newArrayList();
|
| List<Map<InterfaceType, InterfaceType>> superTypesMaps = Lists.newArrayList();
|
|
|