| Index: lib/src/info.dart
|
| diff --git a/lib/src/info.dart b/lib/src/info.dart
|
| index c49162fba0a06731750382bdf86a8cec99bedd8d..a925bbd2939a127fae1c16dc4a4166292f412216 100644
|
| --- a/lib/src/info.dart
|
| +++ b/lib/src/info.dart
|
| @@ -385,6 +385,9 @@ class InferredType extends InferredTypeBase {
|
| if (expression is InstanceCreationExpression) {
|
| return new InferredTypeAllocation(rules, expression, type);
|
| }
|
| + if (expression is FunctionExpression) {
|
| + return new InferredTypeClosure(rules, expression, type);
|
| + }
|
| return new InferredType(rules, expression, type);
|
| }
|
| }
|
| @@ -401,6 +404,12 @@ class InferredTypeAllocation extends InferredTypeBase {
|
| : super._internal(rules, expression, type);
|
| }
|
|
|
| +// An inferred type for a closure expression
|
| +class InferredTypeClosure extends InferredTypeBase {
|
| + InferredTypeClosure(TypeRules rules, Expression expression, DartType type)
|
| + : super._internal(rules, expression, type);
|
| +}
|
| +
|
| // TODO(vsm): Remove these.
|
|
|
| // A wrapped closure coerces the underlying type to the desired type.
|
|
|