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

Side by Side Diff: testcases/input/named_parameters.dart

Issue 2504313002: Fix some issues after introducing NamedType. (Closed)
Patch Set: Update testcase to cover the missing case Created 4 years, 1 month 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 | « lib/type_checker.dart ('k') | testcases/spec-mode/named_parameters.baseline.txt » ('j') | 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 class Superclass { 4 class Superclass {
5 foo({alpha, beta}) {} 5 foo({alpha, beta}) {}
6 bar({beta, alpha}) {} 6 bar({beta, alpha}) {}
7 7
8 namedCallback(callback({alpha, beta})) {} 8 namedCallback(callback({String alpha, int beta})) {
9 callback(alpha: 'one', beta: 2);
10 callback(beta: 1, alpha: 'two');
11 }
9 } 12 }
10 13
11 class Subclass extends Superclass { 14 class Subclass extends Superclass {
12 foo({beta, alpha}) {} 15 foo({beta, alpha}) {}
13 bar({alpha, beta}) {} 16 bar({alpha, beta}) {}
14 17
15 namedCallback(callback({beta, alpha})) {} 18 namedCallback(callback({int beta, String alpha})) {}
16 } 19 }
17 20
18 topLevelNamed(beta, alpha, {gamma, delta}) {} 21 topLevelNamed(beta, alpha, {gamma, delta}) {}
19 topLevelOptional(beta, alpha, [gamma, delta]) {} 22 topLevelOptional(beta, alpha, [gamma, delta]) {}
20 23
21 main() { 24 main() {
22 new Subclass().foo(beta: 1, alpha: 2); 25 new Subclass().foo(beta: 1, alpha: 2);
23 new Subclass().foo(alpha: 1, beta: 2); 26 new Subclass().foo(alpha: 1, beta: 2);
24 topLevelNamed(1, 2, gamma: 3, delta: 4); 27 topLevelNamed(1, 2, gamma: 3, delta: 4);
25 topLevelNamed(1, 2, delta: 3, gamma: 4); 28 topLevelNamed(1, 2, delta: 3, gamma: 4);
26 } 29 }
OLDNEW
« no previous file with comments | « lib/type_checker.dart ('k') | testcases/spec-mode/named_parameters.baseline.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698