| 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 0cc2c64a0681f4bac88abd2aa9c28cd53229357a..625046664f494d87ec1a4f25a33d11cc8296f35e 100644
|
| --- a/compiler/java/com/google/dart/compiler/type/Types.java
|
| +++ b/compiler/java/com/google/dart/compiler/type/Types.java
|
| @@ -5,6 +5,7 @@
|
| package com.google.dart.compiler.type;
|
|
|
| import com.google.common.annotations.VisibleForTesting;
|
| +import com.google.common.base.Function;
|
| import com.google.common.base.Predicate;
|
| import com.google.common.collect.ImmutableList;
|
| import com.google.common.collect.Iterables;
|
| @@ -648,10 +649,21 @@ public class Types {
|
| inferred = (Type) Proxy.newProxyInstance(type.getClass().getClassLoader(),
|
| interfaces, new InvocationHandler() {
|
| @Override
|
| + @SuppressWarnings("unchecked")
|
| public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
|
| if (args == null && method.getName().equals("isInferred")) {
|
| return true;
|
| }
|
| + if (type instanceof FunctionType) {
|
| + if (args == null && method.getName().equals("getParameterTypes")) {
|
| + List<Type> originalTypes = (List<Type>) method.invoke(type, args);
|
| + return Lists.transform(originalTypes, new Function<Type, Type>() {
|
| + public Type apply(Type input) {
|
| + return makeInferred(input);
|
| + }
|
| + });
|
| + }
|
| + }
|
| return method.invoke(type, args);
|
| }
|
| });
|
|
|