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

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

Issue 1484263002: Use destructuring assignments for named parameters (#180) (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years 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/unittest/unittest.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 library methods; 5 library methods;
6 6
7 class A { 7 class A {
8 int x() => 42; 8 int x() => 42;
9 9
10 int y(int a) { 10 int y(int a) {
11 return a; 11 return a;
12 } 12 }
13 13
14 int z([num b]) => b; 14 int z([num b]) => b;
15 15
16 int zz([int b = 0]) => b; 16 int zz([int b = 0]) => b;
17 17
18 int w(int a, {num b}) { 18 int w(int a, {num b}) {
19 return a + b; 19 return a + b;
20 } 20 }
21 21
22 int ww(int a, {int b: 0}) { 22 clashWithObjectProperty({constructor}) => constructor;
23 return a + b; 23 clashWithJsReservedName({function}) => function;
24 }
25 24
26 int get a => x(); 25 int get a => x();
27 26
28 void set b(int b) {} 27 void set b(int b) {}
29 28
30 int _c = 3; 29 int _c = 3;
31 30
32 int get c => _c; 31 int get c => _c;
33 32
34 void set c(int c) { 33 void set c(int c) {
(...skipping 22 matching lines...) Expand all
57 var h = aa.x; 56 var h = aa.x;
58 57
59 // Tear-off of object methods 58 // Tear-off of object methods
60 var ts = a.toString; 59 var ts = a.toString;
61 var nsm = a.noSuchMethod; 60 var nsm = a.noSuchMethod;
62 61
63 // Tear-off extension methods 62 // Tear-off extension methods
64 var c = "".padLeft; 63 var c = "".padLeft;
65 var r = (3.0).floor; 64 var r = (3.0).floor;
66 } 65 }
OLDNEW
« no previous file with comments | « test/codegen/expect/unittest/unittest.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698