OLD | NEW |
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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 typedef void Func(); | 5 typedef void Func(); |
6 | 6 |
7 class C<T> { | 7 class C<T> { |
8 test() { | 8 test() { |
9 // Note: we cannot write a type literal with generic type arguments. For | 9 // Note: we cannot write a type literal with generic type arguments. For |
10 // example, `C<String>` isn't a valid expression. | 10 // example, `C<String>` isn't a valid expression. |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 } | 100 } |
101 } | 101 } |
102 | 102 |
103 use(x) { | 103 use(x) { |
104 if (x == new DateTime.now().millisecondsSinceEpoch) throw "Shouldn't happen"; | 104 if (x == new DateTime.now().millisecondsSinceEpoch) throw "Shouldn't happen"; |
105 } | 105 } |
106 | 106 |
107 main() { | 107 main() { |
108 new C().test(); | 108 new C().test(); |
109 } | 109 } |
OLD | NEW |