OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/generic_syntax_test', null, /* Imports */[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__generic_syntax_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 generic_syntax_test = Object.create(null); |
| 11 let GenericSyntaxTest = () => (GenericSyntaxTest = dart.constFn(generic_syntax
_test.GenericSyntaxTest$()))(); |
| 12 let A = () => (A = dart.constFn(generic_syntax_test.A$()))(); |
| 13 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 14 generic_syntax_test.GenericSyntaxTest$ = dart.generic((B, C, D, E, F) => { |
| 15 let AOfB$C$D$E$F = () => (AOfB$C$D$E$F = dart.constFn(generic_syntax_test.A$
(B, C, D, E, F)))(); |
| 16 let AOfB$C$D$E$FTodynamic = () => (AOfB$C$D$E$FTodynamic = dart.constFn(dart
.definiteFunctionType(dart.dynamic, [AOfB$C$D$E$F()])))(); |
| 17 class GenericSyntaxTest extends core.Object { |
| 18 new() { |
| 19 } |
| 20 foo(x1, x2, x3, x4, x5) { |
| 21 expect$.Expect.equals(true, x1); |
| 22 expect$.Expect.equals(3, x2); |
| 23 expect$.Expect.equals(4, x3); |
| 24 expect$.Expect.equals(5, x4); |
| 25 expect$.Expect.equals(false, x5); |
| 26 } |
| 27 bar(x) { |
| 28 expect$.Expect.equals(null, dart.dcall(x, null)); |
| 29 } |
| 30 test() { |
| 31 let a = 1; |
| 32 let b = 2; |
| 33 let c = 3; |
| 34 let d = 4; |
| 35 let e = 5; |
| 36 let f = 6; |
| 37 let g = 7; |
| 38 let h = null; |
| 39 this.bar(dart.fn(g => h, AOfB$C$D$E$FTodynamic())); |
| 40 this.foo(a < b, c, d, e, f > g); |
| 41 } |
| 42 static testMain() { |
| 43 new generic_syntax_test.GenericSyntaxTest().test(); |
| 44 } |
| 45 } |
| 46 dart.addTypeTests(GenericSyntaxTest); |
| 47 dart.setSignature(GenericSyntaxTest, { |
| 48 constructors: () => ({new: dart.definiteFunctionType(generic_syntax_test.G
enericSyntaxTest$(B, C, D, E, F), [])}), |
| 49 methods: () => ({ |
| 50 foo: dart.definiteFunctionType(dart.void, [dart.dynamic, dart.dynamic, d
art.dynamic, dart.dynamic, dart.dynamic]), |
| 51 bar: dart.definiteFunctionType(dart.void, [dart.dynamic]), |
| 52 test: dart.definiteFunctionType(dart.dynamic, []) |
| 53 }), |
| 54 statics: () => ({testMain: dart.definiteFunctionType(dart.dynamic, [])}), |
| 55 names: ['testMain'] |
| 56 }); |
| 57 return GenericSyntaxTest; |
| 58 }); |
| 59 generic_syntax_test.GenericSyntaxTest = GenericSyntaxTest(); |
| 60 generic_syntax_test.A$ = dart.generic((B, C, D, E, F) => { |
| 61 class A extends core.Object {} |
| 62 dart.addTypeTests(A); |
| 63 return A; |
| 64 }); |
| 65 generic_syntax_test.A = A(); |
| 66 generic_syntax_test.main = function() { |
| 67 generic_syntax_test.GenericSyntaxTest.testMain(); |
| 68 }; |
| 69 dart.fn(generic_syntax_test.main, VoidTodynamic()); |
| 70 // Exports: |
| 71 exports.generic_syntax_test = generic_syntax_test; |
| 72 }); |
OLD | NEW |