Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(743)

Side by Side Diff: pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart

Issue 2946273002: Implement override-based type inference for instance methods. (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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() {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698