OLD | NEW |
| (Empty) |
1 // Copyright (c) 2014, 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 library test_lib; | |
6 | |
7 import 'test_lib_foo.dart'; | |
8 import 'test_lib_bar.dart'; | |
9 export 'test_lib_foo.dart'; | |
10 export 'test_lib_bar.dart'; | |
11 | |
12 /** | |
13 * Doc comment for class [A]. | |
14 * | |
15 * Multiline Test | |
16 */ | |
17 /* | |
18 * Normal comment for class A. | |
19 */ | |
20 class A { | |
21 | |
22 int _someNumber; | |
23 | |
24 A() { | |
25 _someNumber = 12; | |
26 } | |
27 | |
28 A.customConstructor(); | |
29 | |
30 /** | |
31 * Test for linking to parameter [A] | |
32 */ | |
33 void doThis(int A) { | |
34 print(A); | |
35 } | |
36 } | |
37 | |
38 // A trivial use of `B` and `C` to eliminate import warnings | |
39 B sampleMethod(C cInstance) { | |
40 throw new UnimplementedError(); | |
41 } | |
42 | |
43 int positionalDefaultValues([ | |
44 int intConst = 42, | |
45 bool boolConst = true, | |
46 List listConst = const [true, 42, 'Shanna', null, 3.14, const []], | |
47 String stringConst = 'Shanna', | |
48 Map mapConst = const {'a':1, 2: true, 'c': const [1,null,true]}, | |
49 Map emptyMap = const {}, | |
50 int referencedConst = INT_CONST, | |
51 ConstClass constructedConstant1 = const ConstClass<int>(0, true), | |
52 ConstClass constructedConstant2 = const ConstClass(1, false, str: "str")]) { | |
53 throw new UnimplementedError(); | |
54 } | |
55 | |
56 const int INT_CONST = 42; | |
57 | |
58 class ConstClass<T> { | |
59 final bool boolField; | |
60 final int intField; | |
61 final String stringField; | |
62 | |
63 const ConstClass(this.intField, this.boolField, {String str: 'default'}) | |
64 : this.stringField = str; | |
65 } | |
OLD | NEW |