OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/library_same_name_used_test', null, /* Imports */
[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__library_same_name_used_test(exports, dart_sdk, expect) { |
| 5 'use strict'; |
| 6 const core = dart_sdk.core; |
| 7 const dart = dart_sdk.dart; |
| 8 const dartx = dart_sdk.dartx; |
| 9 const expect$ = expect.expect; |
| 10 const library_same_name_used_test = Object.create(null); |
| 11 const library_same_name_used_lib1 = Object.create(null); |
| 12 const library_same_name_used_lib2 = Object.create(null); |
| 13 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 14 let VoidToX = () => (VoidToX = dart.constFn(dart.definiteFunctionType(library_
same_name_used_lib1.X, [])))(); |
| 15 library_same_name_used_test.main = function() { |
| 16 let x = library_same_name_used_lib1.makeX(); |
| 17 expect$.Expect.equals('lib2.X', dart.str`${x}`); |
| 18 }; |
| 19 dart.fn(library_same_name_used_test.main, VoidTodynamic()); |
| 20 library_same_name_used_lib1.X = class X extends core.Object {}; |
| 21 library_same_name_used_lib1.makeX = function() { |
| 22 return new library_same_name_used_lib2.X(); |
| 23 }; |
| 24 dart.fn(library_same_name_used_lib1.makeX, VoidToX()); |
| 25 library_same_name_used_lib2.X = class X extends core.Object { |
| 26 new() { |
| 27 } |
| 28 toString() { |
| 29 return 'lib2.X'; |
| 30 } |
| 31 }; |
| 32 library_same_name_used_lib2.X[dart.implements] = () => [library_same_name_used
_lib1.X]; |
| 33 dart.setSignature(library_same_name_used_lib2.X, { |
| 34 constructors: () => ({new: dart.definiteFunctionType(library_same_name_used_
lib2.X, [])}) |
| 35 }); |
| 36 // Exports: |
| 37 exports.library_same_name_used_test = library_same_name_used_test; |
| 38 exports.library_same_name_used_lib1 = library_same_name_used_lib1; |
| 39 exports.library_same_name_used_lib2 = library_same_name_used_lib2; |
| 40 }); |
OLD | NEW |