| Index: sdk/lib/_internal/compiler/implementation/inferrer/simple_types_inferrer.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/inferrer/simple_types_inferrer.dart b/sdk/lib/_internal/compiler/implementation/inferrer/simple_types_inferrer.dart
|
| index 758d6d4004dbe2064ddfc00769bd9443cf7672ed..41914729f246c3a1bd40978298c09e1b8ddce486 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/inferrer/simple_types_inferrer.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/inferrer/simple_types_inferrer.dart
|
| @@ -596,6 +596,11 @@ class SimpleTypeInferrerVisitor<T>
|
| }
|
|
|
| T visitFunctionExpression(ast.FunctionExpression node) {
|
| + // We loose track of [this] in closures (see issue 20840). To be on
|
| + // the safe side, we mark [this] as exposed here. We could do better by
|
| + // analyzing the closure.
|
| + // TODO(herhut): Analyze whether closure exposes this.
|
| + isThisExposed = true;
|
| LocalFunctionElement element = elements.getFunctionDefinition(node);
|
| // We don't put the closure in the work queue of the
|
| // inferrer, because it will share information with its enclosing
|
|
|