| OLD | NEW |
| (Empty) |
| 1 dart_library.library('temps', null, /* Imports */[ | |
| 2 'dart_sdk' | |
| 3 ], function(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 temps = Object.create(null); | |
| 9 const _x = Symbol('_x'); | |
| 10 const __x = Symbol('__x'); | |
| 11 const _function = Symbol('_function'); | |
| 12 temps.FormalCollision = class FormalCollision extends core.Object { | |
| 13 new(x, _x$, func) { | |
| 14 this[_x] = x; | |
| 15 this[__x] = _x$; | |
| 16 this[_function] = func; | |
| 17 } | |
| 18 }; | |
| 19 dart.setSignature(temps.FormalCollision, { | |
| 20 constructors: () => ({new: [temps.FormalCollision, [core.int, core.int, core
.Function]]}) | |
| 21 }); | |
| 22 const _opt = Symbol('_opt'); | |
| 23 temps.OptionalArg = class OptionalArg extends core.Object { | |
| 24 new(opt) { | |
| 25 if (opt === void 0) opt = 123; | |
| 26 this[_opt] = opt; | |
| 27 this.opt = null; | |
| 28 } | |
| 29 named(opts) { | |
| 30 let opt = opts && 'opt' in opts ? opts.opt : 456; | |
| 31 this.opt = opt; | |
| 32 this[_opt] = null; | |
| 33 } | |
| 34 }; | |
| 35 dart.defineNamedConstructor(temps.OptionalArg, 'named'); | |
| 36 dart.setSignature(temps.OptionalArg, { | |
| 37 constructors: () => ({ | |
| 38 new: [temps.OptionalArg, [], [core.int]], | |
| 39 named: [temps.OptionalArg, [], {opt: core.int}] | |
| 40 }) | |
| 41 }); | |
| 42 temps.main = function() { | |
| 43 core.print(new temps.FormalCollision(1, 2, dart.fn(x => x))); | |
| 44 core.print(new temps.OptionalArg()[_opt]); | |
| 45 core.print(new temps.OptionalArg.named()[_opt]); | |
| 46 }; | |
| 47 dart.fn(temps.main); | |
| 48 // Exports: | |
| 49 exports.temps = temps; | |
| 50 }); | |
| OLD | NEW |