| Index: frog/leg/ssa/closure.dart
|
| diff --git a/frog/leg/ssa/closure.dart b/frog/leg/ssa/closure.dart
|
| index 92948e50589c0ec56debb87302984e518ba4570c..3aefbcd32b9e2e292141c3ee625c48a9cf977dc2 100644
|
| --- a/frog/leg/ssa/closure.dart
|
| +++ b/frog/leg/ssa/closure.dart
|
| @@ -178,8 +178,12 @@ class ClosureTranslator extends AbstractVisitor {
|
| closureData.freeVariableMapping[element] == element);
|
| closureData.freeVariableMapping[element] = element;
|
| } else if (inTryCatchOrFinally) {
|
| - // TODO(ngeoffray): only do this if the variable is mutated.
|
| - closureData.usedVariablesInTry.add(element);
|
| + // Don't mark the this-element. This would complicate things in the
|
| + // builder.
|
| + if (element != closureData.thisElement) {
|
| + // TODO(ngeoffray): only do this if the variable is mutated.
|
| + closureData.usedVariablesInTry.add(element);
|
| + }
|
| }
|
| }
|
|
|
|
|