| 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 6de2bcbcc0525582149acaa1e8892ccd77a44820..404712705bb0c122126c55007452648534a6164b 100644
|
| --- a/compiler/java/com/google/dart/compiler/type/Types.java
|
| +++ b/compiler/java/com/google/dart/compiler/type/Types.java
|
| @@ -506,12 +506,16 @@ public class Types {
|
| * {@link Type#isInferred()}.
|
| */
|
| public static Type makeInferred(Type type) {
|
| - if (type != null) {
|
| - Set<Class<?>> interfaceSet = getAllImplementedInterfaces(type.getClass());
|
| - if (!interfaceSet.isEmpty()) {
|
| - Class<?>[] interfaces = (Class[]) interfaceSet.toArray(new Class[interfaceSet.size()]);
|
| - type = makeInferred(type, interfaces);
|
| - }
|
| + if (type == null) {
|
| + return null;
|
| + }
|
| + if (type.isInferred()) {
|
| + return type;
|
| + }
|
| + Set<Class<?>> interfaceSet = getAllImplementedInterfaces(type.getClass());
|
| + if (!interfaceSet.isEmpty()) {
|
| + Class<?>[] interfaces = (Class[]) interfaceSet.toArray(new Class[interfaceSet.size()]);
|
| + return makeInferred(type, interfaces);
|
| }
|
| return type;
|
| }
|
|
|