OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/named_constructor_test_none_multi', null, /* Impo
rts */[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__named_constructor_test_none_multi(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 named_constructor_test_none_multi = Object.create(null); |
| 11 const named_constructor_lib = Object.create(null); |
| 12 let Class = () => (Class = dart.constFn(named_constructor_test_none_multi.Clas
s$()))(); |
| 13 let ClassOfint = () => (ClassOfint = dart.constFn(named_constructor_test_none_
multi.Class$(core.int)))(); |
| 14 let ClassOfint$ = () => (ClassOfint$ = dart.constFn(named_constructor_lib.Clas
s$(core.int)))(); |
| 15 let Class$ = () => (Class$ = dart.constFn(named_constructor_lib.Class$()))(); |
| 16 let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(da
rt.void, [])))(); |
| 17 named_constructor_test_none_multi.Class$ = dart.generic(T => { |
| 18 class Class extends core.Object { |
| 19 new() { |
| 20 this.value = 0; |
| 21 } |
| 22 named() { |
| 23 this.value = 1; |
| 24 } |
| 25 } |
| 26 dart.addTypeTests(Class); |
| 27 dart.defineNamedConstructor(Class, 'named'); |
| 28 dart.setSignature(Class, { |
| 29 constructors: () => ({ |
| 30 new: dart.definiteFunctionType(named_constructor_test_none_multi.Class$(
T), []), |
| 31 named: dart.definiteFunctionType(named_constructor_test_none_multi.Class
$(T), []) |
| 32 }) |
| 33 }); |
| 34 return Class; |
| 35 }); |
| 36 named_constructor_test_none_multi.Class = Class(); |
| 37 named_constructor_test_none_multi.main = function() { |
| 38 expect$.Expect.equals(0, new named_constructor_test_none_multi.Class().value
); |
| 39 expect$.Expect.equals(0, new (ClassOfint())().value); |
| 40 expect$.Expect.equals(1, new named_constructor_test_none_multi.Class.named()
.value); |
| 41 expect$.Expect.equals(1, new (ClassOfint()).named().value); |
| 42 expect$.Expect.equals(2, new named_constructor_lib.Class().value); |
| 43 expect$.Expect.equals(2, new (ClassOfint$())().value); |
| 44 expect$.Expect.equals(3, new named_constructor_lib.Class.named().value); |
| 45 expect$.Expect.equals(3, new (ClassOfint$()).named().value); |
| 46 }; |
| 47 dart.fn(named_constructor_test_none_multi.main, VoidTovoid()); |
| 48 named_constructor_lib.Class$ = dart.generic(T => { |
| 49 class Class extends core.Object { |
| 50 new() { |
| 51 this.value = 2; |
| 52 } |
| 53 named() { |
| 54 this.value = 3; |
| 55 } |
| 56 } |
| 57 dart.addTypeTests(Class); |
| 58 dart.defineNamedConstructor(Class, 'named'); |
| 59 dart.setSignature(Class, { |
| 60 constructors: () => ({ |
| 61 new: dart.definiteFunctionType(named_constructor_lib.Class$(T), []), |
| 62 named: dart.definiteFunctionType(named_constructor_lib.Class$(T), []) |
| 63 }) |
| 64 }); |
| 65 return Class; |
| 66 }); |
| 67 named_constructor_lib.Class = Class$(); |
| 68 // Exports: |
| 69 exports.named_constructor_test_none_multi = named_constructor_test_none_multi; |
| 70 exports.named_constructor_lib = named_constructor_lib; |
| 71 }); |
OLD | NEW |