0c148ecef4
Highlights * compile one module at a time * use summaries to speed up compiles * use command runner so we can add more commands later * some long needed renames and file organization * various other technical debt has been addressed Lowlights * lost node.js runner/tests (node output format still supported) * possibly lost some closure support/workarounds (format still supported) * needs more end-to-end tests of the new system R=vsm@google.com Review URL: https://codereview.chromium.org/1879373004 .
19 lines
616 B
Dart
19 lines
616 B
Dart
// compile options: --source-map
|
|
// TODO(jmesserly): more comprehensive strategy for testing the source map.
|
|
// (this is used so we're covering it in at least one test)
|
|
|
|
import 'dart:math' show Random;
|
|
main() {
|
|
// Uses a JS object literal
|
|
print({ '1': 2, '3': 4, '5': 6 });
|
|
// Uses array literal
|
|
print({ 1: 2, 3: 4, 5: 6 });
|
|
// Uses ES6 enhanced object literal
|
|
print({ '1': 2, '${new Random().nextInt(2) + 2}': 4, '5': 6 });
|
|
String x = '3';
|
|
// Could use enhanced object literal if we knew `x` was not null
|
|
print({ '1': 2, x: 4, '5': 6 });
|
|
// Array literal
|
|
print({ '1': 2, null: 4, '5': 6 });
|
|
}
|