Index: pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart |
diff --git a/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart b/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart |
index ae711e06405787400c276287c898e9028430f077..b1591635bb0adf4bd38c61f17880ab9ac6fc9338 100644 |
--- a/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart |
+++ b/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart |
@@ -32,6 +32,7 @@ import '../js_backend/runtime_types.dart' |
TypeCheck, |
TypeChecks; |
import '../js_emitter/sorter.dart'; |
+import '../js_model/closure.dart' show JClosureField; |
import '../util/util.dart' show Setlet; |
import '../world.dart'; |
@@ -180,8 +181,10 @@ class RuntimeTypeGenerator { |
if (!method.isAbstract) { |
ScopeInfo scopeInfo = _closureDataLookup.getScopeInfo(method); |
if (scopeInfo is ClosureRepresentationInfo) { |
- ClosureFieldElement thisLocal = scopeInfo.thisFieldEntity; |
+ FieldEntity thisLocal = scopeInfo.thisFieldEntity; |
if (thisLocal != null) { |
+ assert( |
+ thisLocal is ClosureFieldElement || thisLocal is JClosureField); |
jsAst.Name thisName = _namer.instanceFieldPropertyName(thisLocal); |
thisAccess = js('this.#', thisName); |
} |