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

Side by Side Diff: test/codegen/temps.dart

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 unified diff | Download patch
« no previous file with comments | « test/codegen/expect/temps.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 class FormalCollision { 5 class FormalCollision {
6 // These shouldn't collide (see issue #136) 6 // These shouldn't collide (see issue #136)
7 int _x, __x; 7 int _x, __x;
8 // This shouldn't generate a keyword as an identifier. 8 // This shouldn't generate a keyword as an identifier.
9 Function _function; 9 Function _function;
10 FormalCollision(this._x, this.__x, this._function); 10 FormalCollision(this._x, this.__x, this._function);
11 } 11 }
12 12
13 class OptionalArg {
14 int _opt;
15 OptionalArg([this._opt = 123]);
16 OptionalArg.named({this._opt: 456});
17 }
18
13 main() { 19 main() {
14 print(new FormalCollision(1, 2, (x) => x)); 20 print(new FormalCollision(1, 2, (x) => x));
21 print(new OptionalArg()._opt);
22 print(new OptionalArg.named()._opt);
15 } 23 }
OLDNEW
« no previous file with comments | « test/codegen/expect/temps.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698