Files
sdk/pkg/dev_compiler/test/codegen/expect/varargs.js
T
Olivier Chafik 5337fc001e Compile package:js.{rest, spread} helpers.
Note: need new package:js release before merging this in (https://github.com/dart-lang/sdk/issues/24623). Maybe it's time to think again about sneaking JsName + JsPeerInterface into it? (https://github.com/dart-lang/dev_compiler/issues/135)

BUG=https://github.com/dart-lang/dev_compiler/issues/310
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/1424133007 .
2015-10-29 18:44:11 +00:00

21 lines
523 B
JavaScript

dart_library.library('varargs', null, /* Imports */[
"dart/_runtime"
], /* Lazy imports */[
], function(exports, dart) {
'use strict';
let dartx = dart.dartx;
function varargsTest(x, ...others) {
let args = [1, others];
dart.dsend(x, 'call', ...args);
}
dart.fn(varargsTest);
function varargsTest2(x, ...others) {
let args = [1, others];
dart.dsend(x, 'call', ...args);
}
dart.fn(varargsTest2);
// Exports:
exports.varargsTest = varargsTest;
exports.varargsTest2 = varargsTest2;
});