OLD | NEW |
| (Empty) |
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 | |
3 // BSD-style license that can be found in the LICENSE file. | |
4 | |
5 class FormalCollision { | |
6 // These shouldn't collide (see issue #136) | |
7 int _x, __x; | |
8 // This shouldn't generate a keyword as an identifier. | |
9 Function _function; | |
10 FormalCollision(this._x, this.__x, this._function); | |
11 } | |
12 | |
13 class OptionalArg { | |
14 int opt, _opt; | |
15 OptionalArg([this._opt = 123]); | |
16 OptionalArg.named({this.opt: 456}); | |
17 } | |
18 | |
19 main() { | |
20 print(new FormalCollision(1, 2, (x) => x)); | |
21 print(new OptionalArg()._opt); | |
22 print(new OptionalArg.named()._opt); | |
23 } | |
OLD | NEW |