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

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

Issue 1965213003: simplify constructors, fixes #564 (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 7 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 | « test/codegen/expect/sunflower/sunflower.js.map ('k') | tool/input_sdk/private/ddc_runtime/classes.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 dfb51975261af1aa89b9e12f737d685555e3223d..3cbed26fb8e62d2c1a69de659fdb8bce34b01166 100644
--- a/test/codegen/expect/temps.js
+++ b/test/codegen/expect/temps.js
@@ -10,18 +10,18 @@ dart_library.library('temps', null, /* Imports */[
const __x = Symbol('__x');
const _function = Symbol('_function');
temps.FormalCollision = class FormalCollision extends core.Object {
- FormalCollision(x, _x$, func) {
+ new(x, _x$, func) {
this[_x] = x;
this[__x] = _x$;
this[_function] = func;
}
};
dart.setSignature(temps.FormalCollision, {
- constructors: () => ({FormalCollision: [temps.FormalCollision, [core.int, core.int, core.Function]]})
+ constructors: () => ({new: [temps.FormalCollision, [core.int, core.int, core.Function]]})
});
const _opt = Symbol('_opt');
temps.OptionalArg = class OptionalArg extends core.Object {
- OptionalArg(opt) {
+ new(opt) {
if (opt === void 0) opt = 123;
this[_opt] = opt;
this.opt = null;
@@ -35,7 +35,7 @@ dart_library.library('temps', null, /* Imports */[
dart.defineNamedConstructor(temps.OptionalArg, 'named');
dart.setSignature(temps.OptionalArg, {
constructors: () => ({
- OptionalArg: [temps.OptionalArg, [], [core.int]],
+ new: [temps.OptionalArg, [], [core.int]],
named: [temps.OptionalArg, [], {opt: core.int}]
})
});
« no previous file with comments | « test/codegen/expect/sunflower/sunflower.js.map ('k') | tool/input_sdk/private/ddc_runtime/classes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698