OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/named_parameter_regression_test', null, /* Import
s */[ |
| 2 'dart_sdk' |
| 3 ], function load__named_parameter_regression_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 named_parameter_regression_test = Object.create(null); |
| 9 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 10 named_parameter_regression_test.Fisk = class Fisk extends core.Object { |
| 11 foo(opts) { |
| 12 let b = opts && 'b' in opts ? opts.b : null; |
| 13 let a = opts && 'a' in opts ? opts.a : true; |
| 14 if (b == null) return; |
| 15 dart.throw('broken'); |
| 16 } |
| 17 bar(opts) { |
| 18 let a = opts && 'a' in opts ? opts.a : null; |
| 19 let b = opts && 'b' in opts ? opts.b : true; |
| 20 if (a == null) return; |
| 21 dart.throw('broken'); |
| 22 } |
| 23 }; |
| 24 dart.setSignature(named_parameter_regression_test.Fisk, { |
| 25 methods: () => ({ |
| 26 foo: dart.definiteFunctionType(dart.dynamic, [], {b: dart.dynamic, a: dart
.dynamic}), |
| 27 bar: dart.definiteFunctionType(dart.dynamic, [], {a: dart.dynamic, b: dart
.dynamic}) |
| 28 }) |
| 29 }); |
| 30 named_parameter_regression_test.main = function() { |
| 31 new named_parameter_regression_test.Fisk().foo({a: true}); |
| 32 new named_parameter_regression_test.Fisk().bar({b: true}); |
| 33 }; |
| 34 dart.fn(named_parameter_regression_test.main, VoidTodynamic()); |
| 35 // Exports: |
| 36 exports.named_parameter_regression_test = named_parameter_regression_test; |
| 37 }); |
OLD | NEW |