OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/generics2_test', null, /* Imports */[ |
| 2 'dart_sdk' |
| 3 ], function load__generics2_test(exports, dart_sdk) { |
| 4 'use strict'; |
| 5 const core = dart_sdk.core; |
| 6 const dart = dart_sdk.dart; |
| 7 const dartx = dart_sdk.dartx; |
| 8 const generics2_test = Object.create(null); |
| 9 let A = () => (A = dart.constFn(generics2_test.A$()))(); |
| 10 let Pair = () => (Pair = dart.constFn(generics2_test.Pair$()))(); |
| 11 let PairOfint$int = () => (PairOfint$int = dart.constFn(generics2_test.Pair$(c
ore.int, core.int)))(); |
| 12 let PairOfString$int = () => (PairOfString$int = dart.constFn(generics2_test.P
air$(core.String, core.int)))(); |
| 13 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 14 generics2_test.A$ = dart.generic(E => { |
| 15 class A extends core.Object {} |
| 16 dart.addTypeTests(A); |
| 17 return A; |
| 18 }); |
| 19 generics2_test.A = A(); |
| 20 generics2_test.Pair$ = dart.generic((P, Q) => { |
| 21 class Pair extends generics2_test.A { |
| 22 new(fst, snd) { |
| 23 this.fst = fst; |
| 24 this.snd = snd; |
| 25 } |
| 26 } |
| 27 dart.setSignature(Pair, { |
| 28 constructors: () => ({new: dart.definiteFunctionType(generics2_test.Pair$(
P, Q), [P, Q])}) |
| 29 }); |
| 30 return Pair; |
| 31 }); |
| 32 generics2_test.Pair = Pair(); |
| 33 generics2_test.main = function() { |
| 34 core.print(new (PairOfint$int())(1, 2)); |
| 35 core.print(new (PairOfString$int())("1", 2)); |
| 36 }; |
| 37 dart.fn(generics2_test.main, VoidTodynamic()); |
| 38 // Exports: |
| 39 exports.generics2_test = generics2_test; |
| 40 }); |
OLD | NEW |