Index: pkg/compiler/lib/src/closure.dart |
diff --git a/pkg/compiler/lib/src/closure.dart b/pkg/compiler/lib/src/closure.dart |
index 49c0eaec0eba6669f7b6559485ce84fbb58ad719..3beedab0e68ae4ffebca7e86d30ea4ce1c398e3d 100644 |
--- a/pkg/compiler/lib/src/closure.dart |
+++ b/pkg/compiler/lib/src/closure.dart |
@@ -651,7 +651,8 @@ class ClosureTranslator extends Visitor { |
// things in the builder. |
// Note that nested (named) functions are immutable. |
if (variable != closureData.thisLocal && |
- variable != closureData.closureElement) { |
+ variable != closureData.closureElement && |
+ variable is! TypeVariableLocal) { |
closureData.variablesUsedInTryOrGenerator.add(variable); |
} |
} else if (variable is LocalParameterElement && |