OLD | NEW |
| (Empty) |
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 | |
3 // BSD-style license that can be found in the LICENSE file. | |
4 class Superclass { | |
5 foo({alpha, beta}) {} | |
6 bar({beta, alpha}) {} | |
7 | |
8 namedCallback(callback({String alpha, int beta})) { | |
9 callback(alpha: 'one', beta: 2); | |
10 callback(beta: 1, alpha: 'two'); | |
11 } | |
12 } | |
13 | |
14 class Subclass extends Superclass { | |
15 foo({beta, alpha}) {} | |
16 bar({alpha, beta}) {} | |
17 | |
18 namedCallback(callback({int beta, String alpha})) {} | |
19 } | |
20 | |
21 topLevelNamed(beta, alpha, {gamma, delta}) {} | |
22 topLevelOptional(beta, alpha, [gamma, delta]) {} | |
23 | |
24 main() { | |
25 new Subclass().foo(beta: 1, alpha: 2); | |
26 new Subclass().foo(alpha: 1, beta: 2); | |
27 topLevelNamed(1, 2, gamma: 3, delta: 4); | |
28 topLevelNamed(1, 2, delta: 3, gamma: 4); | |
29 } | |
OLD | NEW |