Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Unified Diff: test/codegen/expect/temps.js

Issue 1082333004: fixes #145, optional params+initializing formals+private fields (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/codegen/js_codegen.dart ('k') | test/codegen/temps.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/expect/temps.js
diff --git a/test/codegen/expect/temps.js b/test/codegen/expect/temps.js
index 821b41bedc879dfb63be527e110105ff9120f612..c873da0999dd97d184d1a9cf1d90966b2f2e6a36 100644
--- a/test/codegen/expect/temps.js
+++ b/test/codegen/expect/temps.js
@@ -11,11 +11,27 @@ var temps;
this[_function] = func;
}
}
+ let _opt = Symbol('_opt');
+ class OptionalArg extends core.Object {
+ OptionalArg(opt) {
+ if (opt === void 0)
+ opt = 123;
+ this[_opt] = opt;
+ }
+ named(opts) {
+ let opt = opts && '_opt' in opts ? opts._opt : 456;
+ this[_opt] = opt;
+ }
+ }
+ dart.defineNamedConstructor(OptionalArg, 'named');
// Function main: () → dynamic
function main() {
core.print(new FormalCollision(1, 2, x => x));
+ core.print(new OptionalArg()[_opt]);
+ core.print(new OptionalArg.named()[_opt]);
}
// Exports:
exports.FormalCollision = FormalCollision;
+ exports.OptionalArg = OptionalArg;
exports.main = main;
})(temps || (temps = {}));
« no previous file with comments | « lib/src/codegen/js_codegen.dart ('k') | test/codegen/temps.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698