| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import 'dart:async'; | 5 import 'dart:async'; |
| 6 import 'package:expect/expect.dart'; | 6 import 'package:expect/expect.dart'; |
| 7 import 'package:async_helper/async_helper.dart'; | 7 import 'package:async_helper/async_helper.dart'; |
| 8 import 'package:compiler/src/compiler.dart'; | 8 import 'package:compiler/src/compiler.dart'; |
| 9 import 'package:compiler/src/diagnostics/messages.dart' show MessageKind; | 9 import 'package:compiler/src/diagnostics/messages.dart' show MessageKind; |
| 10 import 'package:compiler/src/elements/elements.dart'; | 10 import 'package:compiler/src/elements/elements.dart'; |
| (...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 908 } | 908 } |
| 909 """, | 909 """, |
| 910 main: """ | 910 main: """ |
| 911 main () { | 911 main () { |
| 912 new A(); // ensure A and B are instantiated | 912 new A(); // ensure A and B are instantiated |
| 913 new B(); | 913 new B(); |
| 914 } | 914 } |
| 915 """, | 915 """, |
| 916 runCompiler: true, | 916 runCompiler: true, |
| 917 analyzeOnly: true); | 917 analyzeOnly: true); |
| 918 compiler.closeResolution(); | 918 compiler.closeResolution( |
| 919 compiler.frontendStrategy.elementEnvironment.mainFunction); |
| 919 ClosedWorld world = compiler.resolutionWorldBuilder.closedWorldForTesting; | 920 ClosedWorld world = compiler.resolutionWorldBuilder.closedWorldForTesting; |
| 920 | 921 |
| 921 ClassElement cls = ensure( | 922 ClassElement cls = ensure( |
| 922 compiler, "A", compiler.resolution.commonElements.coreLibrary.find, | 923 compiler, "A", compiler.resolution.commonElements.coreLibrary.find, |
| 923 expectIsPatched: true); | 924 expectIsPatched: true); |
| 924 cls.ensureResolved(compiler.resolution); | 925 cls.ensureResolved(compiler.resolution); |
| 925 | 926 |
| 926 ensure(compiler, "method", cls.patch.lookupLocalMember, | 927 ensure(compiler, "method", cls.patch.lookupLocalMember, |
| 927 checkHasBody: true, expectIsRegular: true); | 928 checkHasBody: true, expectIsRegular: true); |
| 928 | 929 |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1114 await testPatchNonFunction(); | 1115 await testPatchNonFunction(); |
| 1115 | 1116 |
| 1116 await testPatchAndSelector(); | 1117 await testPatchAndSelector(); |
| 1117 | 1118 |
| 1118 await testEffectiveTarget(); | 1119 await testEffectiveTarget(); |
| 1119 | 1120 |
| 1120 await testAnalyzeAllInjectedMembers(); | 1121 await testAnalyzeAllInjectedMembers(); |
| 1121 await testTypecheckPatchedMembers(); | 1122 await testTypecheckPatchedMembers(); |
| 1122 }); | 1123 }); |
| 1123 } | 1124 } |
| OLD | NEW |