| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 /*@testedFeatures=inference*/ | 5 /*@testedFeatures=inference*/ |
| 6 library test; | 6 library test; |
| 7 | 7 |
| 8 class A { | 8 class A { |
| 9 int x; | 9 int x; |
| 10 B operator +(other) => null; | 10 B operator +(/*@topType=dynamic*/ other) => null; |
| 11 } | 11 } |
| 12 | 12 |
| 13 class B extends A { | 13 class B extends A { |
| 14 B(ignore); | 14 B(ignore); |
| 15 } | 15 } |
| 16 | 16 |
| 17 var /*@topType=A*/ a = new A(); | 17 var /*@topType=A*/ a = new A(); |
| 18 // Note: it doesn't matter that some of these refer to 'x'. | 18 // Note: it doesn't matter that some of these refer to 'x'. |
| 19 var /*@topType=B*/ b = new B(/*error:UNDEFINED_IDENTIFIER*/ x); // allocations | 19 var /*@topType=B*/ b = new B(/*error:UNDEFINED_IDENTIFIER*/ x); // allocations |
| 20 var /*@topType=List<dynamic>*/ c1 = /*@typeArgs=dynamic*/ [ | 20 var /*@topType=List<dynamic>*/ c1 = /*@typeArgs=dynamic*/ [ |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 g = /*error:INVALID_ASSIGNMENT*/ false; | 53 g = /*error:INVALID_ASSIGNMENT*/ false; |
| 54 h = /*error:INVALID_ASSIGNMENT*/ false; | 54 h = /*error:INVALID_ASSIGNMENT*/ false; |
| 55 h = new B('b'); | 55 h = new B('b'); |
| 56 i = false; | 56 i = false; |
| 57 j = new B('b'); | 57 j = new B('b'); |
| 58 j = /*error:INVALID_ASSIGNMENT*/ false; | 58 j = /*error:INVALID_ASSIGNMENT*/ false; |
| 59 j = /*error:INVALID_ASSIGNMENT*/ /*@typeArgs=dynamic*/ []; | 59 j = /*error:INVALID_ASSIGNMENT*/ /*@typeArgs=dynamic*/ []; |
| 60 } | 60 } |
| 61 | 61 |
| 62 main() {} | 62 main() {} |
| OLD | NEW |