Index: tests/compiler/dart2js/serialization/test_data.dart |
diff --git a/tests/compiler/dart2js/serialization/test_data.dart b/tests/compiler/dart2js/serialization/test_data.dart |
index ba29340091293597b2be8fe51aac49f36854df94..dd12bfd81b4eb6a9eec793c8a59c604644320034 100644 |
--- a/tests/compiler/dart2js/serialization/test_data.dart |
+++ b/tests/compiler/dart2js/serialization/test_data.dart |
@@ -594,6 +594,43 @@ class C { |
test() => new C().foo = 0; |
''', |
}, checkedMode: true), |
+ |
+ const Test('Deferred access', const { |
+ 'main.dart': ''' |
+import 'a.dart'; |
+ |
+main() { |
+ test(); |
+} |
+''', |
+ }, preserializedSourceFiles: const { |
+ 'a.dart': ''' |
+import 'b.dart' deferred as b; |
+ |
+test() => b.loadLibrary().then((_) => b.test2()); |
+''', |
+ 'b.dart': ''' |
+test2() {} |
+''', |
+ }), |
+ |
+ const Test('Deferred access of dart:core', const { |
+ 'main.dart': ''' |
+import 'a.dart'; |
+ |
+main() { |
+ test(); |
+} |
+''', |
+ }, preserializedSourceFiles: const { |
+ 'a.dart': ''' |
+import "dart:core" deferred as core; |
+ |
+test() { |
+ core.loadLibrary().then((_) => null); |
+} |
+''', |
+ }), |
]; |
class Test { |