Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 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 | 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 // Codegen dependency order test | 6 // Codegen dependency order test |
| 7 const UNINITIALIZED = const _Uninitialized(); | 7 const UNINITIALIZED = const _Uninitialized(); |
| 8 class _Uninitialized { const _Uninitialized(); } | 8 class _Uninitialized { const _Uninitialized(); } |
| 9 | 9 |
| 10 class Generic<T> { | |
| 11 Type get type => Generic; | |
| 12 } | |
| 13 | |
| 10 main() { | 14 main() { |
| 11 // Number literals in call expressions. | 15 // Number literals in call expressions. |
| 12 print(1.toString()); | 16 print(1.toString()); |
| 13 print(1.0.toString()); | 17 print(1.0.toString()); |
| 14 print(1.1.toString()); | 18 print(1.1.toString()); |
| 19 | |
| 20 // Type literals, #184 | |
| 21 dynamic x = 42; | |
| 22 print(x == dynamic); | |
|
vsm
2015/05/18 20:27:56
If you had plain "Generic" as a id outside, you'd
Jennifer Messerly
2015/05/18 20:41:14
yup! added example
that's the beauty of plumbing
| |
| 23 | |
| 24 // Should be Generic<dynamic> | |
| 25 print(new Generic<int>().type); | |
| 15 } | 26 } |
| OLD | NEW |