Index: tests/compiler/dart2js/serialization/model_test_helper.dart |
diff --git a/tests/compiler/dart2js/serialization/model_test_helper.dart b/tests/compiler/dart2js/serialization/model_test_helper.dart |
index 2c6d86176b2d8109ef0e25b8b69bfd4fc5b20e2f..e9bd90afe830cbd397ef5b972b311c0a6d638255 100644 |
--- a/tests/compiler/dart2js/serialization/model_test_helper.dart |
+++ b/tests/compiler/dart2js/serialization/model_test_helper.dart |
@@ -182,6 +182,24 @@ void checkElements( |
"$element1.variablesUsedInTryOrGenerator", |
areLocalsEquivalent, |
verbose: verbose); |
+ if (element1 is MemberElement && element2 is MemberElement) { |
+ MemberElement member1 = element1.implementation; |
+ MemberElement member2 = element2.implementation; |
+ checkSets( |
+ member1.nestedClosures, |
+ member2.nestedClosures, |
+ "$member1.nestedClosures", |
+ areElementsEquivalent, |
+ verbose: verbose, |
+ onSameElement: (a, b) { |
+ LocalFunctionElement localFunction1 = a.expression; |
+ LocalFunctionElement localFunction2 = b.expression; |
+ checkElementIdentities( |
+ localFunction1, localFunction2, |
+ 'enclosingClass', |
+ localFunction1.enclosingClass, localFunction2.enclosingClass); |
+ }); |
+ } |
} |
JavaScriptBackend backend1 = compiler1.backend; |
JavaScriptBackend backend2 = compiler2.backend; |