Files
sdk/pkg/dev_compiler/test/codegen/expect/map_keys.js
T
Olivier Chafik 7add882a7a Move runtime js files down to lib/runtime/dart
Prepare for writing all the runtime in Dart:
- Move js runtime files to lib/runtime/dart (dart_runtime.js ->
dart/_runtime.js),
- Use rest params instead of arguments slicing in a couple of places.

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

Review URL: https://codereview.chromium.org/1413683006 .
2015-10-29 16:44:49 +00:00

21 lines
646 B
JavaScript

dart_library.library('map_keys', null, /* Imports */[
"dart/_runtime",
'dart/core',
'dart/math'
], /* Lazy imports */[
], function(exports, dart, core, math) {
'use strict';
let dartx = dart.dartx;
function main() {
core.print(dart.map({'1': 2, '3': 4, '5': 6}));
core.print(dart.map([1, 2, 3, 4, 5, 6]));
core.print(dart.map({'1': 2, [`${dart.notNull(math.Random.new().nextInt(2)) + 2}`]: 4, '5': 6}));
let x = '3';
core.print(dart.map(['1', 2, x, 4, '5', 6]));
core.print(dart.map(['1', 2, null, 4, '5', 6]));
}
dart.fn(main);
// Exports:
exports.main = main;
});
//# sourceMappingURL=map_keys.js.map