OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 /** | 5 /** |
6 * This file is read by 'mirrors_test.dart'. | 6 * This file is read by 'mirrors_test.dart'. |
7 */ | 7 */ |
8 | 8 |
9 library mirrors_helper; | 9 library mirrors_helper; |
10 | 10 |
11 typedef E Func<E,F extends Foo>(F f); | 11 typedef E Func<E,F extends Foo>(F f); |
12 | 12 |
13 main() { | 13 main() { |
14 | 14 |
15 } | 15 } |
16 | 16 |
| 17 @Metadata // This is intentionally the type literal. |
| 18 @Metadata(null) |
| 19 @Metadata(true) |
| 20 @Metadata(false) |
| 21 @Metadata(0) |
| 22 @Metadata(1.5) |
| 23 @Metadata("Foo") |
| 24 @Metadata(const ["Foo"]) |
| 25 @Metadata(const {'foo':"Foo"}) |
| 26 @metadata |
17 class Foo { | 27 class Foo { |
18 | 28 |
19 } | 29 } |
20 | 30 |
21 abstract class Bar<E> { | 31 abstract class Bar<E> { |
22 | 32 |
23 } | 33 } |
24 | 34 |
25 class Baz<E,F extends Foo> implements Bar<E> { | 35 class Baz<E,F extends Foo> implements Bar<E> { |
26 Baz(); | 36 Baz(); |
(...skipping 19 matching lines...) Expand all Loading... |
46 } | 56 } |
47 } | 57 } |
48 | 58 |
49 class _PrivateClass { | 59 class _PrivateClass { |
50 var _privateField; | 60 var _privateField; |
51 get _privateGetter => _privateField; | 61 get _privateGetter => _privateField; |
52 void set _privateSetter(value) => _privateField = value; | 62 void set _privateSetter(value) => _privateField = value; |
53 void _privateMethod() {} | 63 void _privateMethod() {} |
54 _PrivateClass._privateConstructor(); | 64 _PrivateClass._privateConstructor(); |
55 factory _PrivateClass._privateFactoryConstructor() => new _PrivateClass(); | 65 factory _PrivateClass._privateFactoryConstructor() => new _PrivateClass(); |
| 66 } |
| 67 |
| 68 const metadata = const Metadata(null); |
| 69 |
| 70 class Metadata { |
| 71 final data; |
| 72 const Metadata(this.data); |
56 } | 73 } |
OLD | NEW |