| OLD | NEW |
| 1 dart_library.library('language/implicit_closure_test', null, /* Imports */[ | 1 dart_library.library('language/implicit_closure_test', null, /* Imports */[ |
| 2 'dart_sdk', | 2 'dart_sdk', |
| 3 'expect' | 3 'expect' |
| 4 ], function load__implicit_closure_test(exports, dart_sdk, expect) { | 4 ], function load__implicit_closure_test(exports, dart_sdk, expect) { |
| 5 'use strict'; | 5 'use strict'; |
| 6 const core = dart_sdk.core; | 6 const core = dart_sdk.core; |
| 7 const dart = dart_sdk.dart; | 7 const dart = dart_sdk.dart; |
| 8 const dartx = dart_sdk.dartx; | 8 const dartx = dart_sdk.dartx; |
| 9 const expect$ = expect.expect; | 9 const expect$ = expect.expect; |
| 10 const implicit_closure_test = Object.create(null); | 10 const implicit_closure_test = Object.create(null); |
| 11 let VoidToint = () => (VoidToint = dart.constFn(dart.definiteFunctionType(core
.int, [])))(); |
| 11 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); | 12 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 12 let VoidToint = () => (VoidToint = dart.constFn(dart.definiteFunctionType(core
.int, [])))(); | |
| 13 implicit_closure_test.First = class First extends core.Object { | 13 implicit_closure_test.First = class First extends core.Object { |
| 14 new(i) { | 14 new(i) { |
| 15 this.i = i; | 15 this.i = i; |
| 16 this.b = null; | 16 this.b = null; |
| 17 } | 17 } |
| 18 foo() { | 18 foo() { |
| 19 return this.i; | 19 return this.i; |
| 20 } | 20 } |
| 21 foo1() { | 21 foo1() { |
| 22 const local = (function() { | 22 const local = (function() { |
| 23 return this.i; | 23 return this.i; |
| 24 }).bind(this); | 24 }).bind(this); |
| 25 dart.fn(local, VoidTodynamic()); | 25 dart.fn(local, VoidToint()); |
| 26 return local; | 26 return local; |
| 27 } | 27 } |
| 28 }; | 28 }; |
| 29 dart.setSignature(implicit_closure_test.First, { | 29 dart.setSignature(implicit_closure_test.First, { |
| 30 constructors: () => ({new: dart.definiteFunctionType(implicit_closure_test.F
irst, [core.int])}), | 30 constructors: () => ({new: dart.definiteFunctionType(implicit_closure_test.F
irst, [core.int])}), |
| 31 methods: () => ({ | 31 methods: () => ({ |
| 32 foo: dart.definiteFunctionType(core.int, []), | 32 foo: dart.definiteFunctionType(core.int, []), |
| 33 foo1: dart.definiteFunctionType(core.Function, []) | 33 foo1: dart.definiteFunctionType(core.Function, []) |
| 34 }) | 34 }) |
| 35 }); | 35 }); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 49 statics: () => ({testMain: dart.definiteFunctionType(dart.void, [])}), | 49 statics: () => ({testMain: dart.definiteFunctionType(dart.void, [])}), |
| 50 names: ['testMain'] | 50 names: ['testMain'] |
| 51 }); | 51 }); |
| 52 implicit_closure_test.main = function() { | 52 implicit_closure_test.main = function() { |
| 53 implicit_closure_test.ImplicitClosureTest.testMain(); | 53 implicit_closure_test.ImplicitClosureTest.testMain(); |
| 54 }; | 54 }; |
| 55 dart.fn(implicit_closure_test.main, VoidTodynamic()); | 55 dart.fn(implicit_closure_test.main, VoidTodynamic()); |
| 56 // Exports: | 56 // Exports: |
| 57 exports.implicit_closure_test = implicit_closure_test; | 57 exports.implicit_closure_test = implicit_closure_test; |
| 58 }); | 58 }); |
| OLD | NEW |