| 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> { | 10 class Generic<T> { |
| 11 Type get type => Generic; | 11 Type get type => Generic; |
| 12 // type parameter type literals |
| 13 m() => print(T); |
| 12 } | 14 } |
| 13 | 15 |
| 14 // super == | 16 // super == |
| 15 // https://github.com/dart-lang/dev_compiler/issues/226 | 17 // https://github.com/dart-lang/dev_compiler/issues/226 |
| 16 class Base { | 18 class Base { |
| 17 int x = 1, y = 2; | 19 int x = 1, y = 2; |
| 18 operator==(obj) { | 20 operator==(obj) { |
| 19 return obj is Base && obj.x == x && obj.y == y; | 21 return obj is Base && obj.x == x && obj.y == y; |
| 20 } | 22 } |
| 21 } | 23 } |
| (...skipping 30 matching lines...) Expand all Loading... |
| 52 | 54 |
| 53 // Type literals, #184 | 55 // Type literals, #184 |
| 54 dynamic x = 42; | 56 dynamic x = 42; |
| 55 print(x == dynamic); | 57 print(x == dynamic); |
| 56 print(x == Generic); | 58 print(x == Generic); |
| 57 | 59 |
| 58 // Should be Generic<dynamic> | 60 // Should be Generic<dynamic> |
| 59 print(new Generic<int>().type); | 61 print(new Generic<int>().type); |
| 60 | 62 |
| 61 print(new Derived() == new Derived()); // true | 63 print(new Derived() == new Derived()); // true |
| 64 |
| 65 new Generic<int>().m(); |
| 62 } | 66 } |
| OLD | NEW |