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

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

Issue 2941813002: Fix fasta testcase to avoid a super call to an abstract method. (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
« no previous file with comments | « no previous file | pkg/front_end/testcases/inference/infer_assign_to_index_super_upwards.dart.direct.expect » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 int getInt() => 0; 8 int getInt() => 0;
9 num getNum() => 0; 9 num getNum() => 0;
10 double getDouble() => 0.0; 10 double getDouble() => 0.0;
11 11
12 abstract class Base<T, U> { 12 abstract class Base<T, U> {
13 T operator [](String s); 13 T operator [](String s) => /*@target=Base::getValue*/ getValue(s);
14 void operator []=(String s, U v); 14 void operator []=(String s, U v) => /*@target=Base::setValue*/ setValue(s, v);
15
16 T getValue(String s);
17 void setValue(String s, U v);
15 } 18 }
16 19
17 abstract class Test1 extends Base<int, int> { 20 abstract class Test1 extends Base<int, int> {
18 void test() { 21 void test() {
19 var /*@type=int*/ v1 = super /*@target=Base::[]=*/ ['x'] = getInt(); 22 var /*@type=int*/ v1 = super /*@target=Base::[]=*/ ['x'] = getInt();
20 var /*@type=num*/ v2 = super /*@target=Base::[]=*/ ['x'] = getNum(); 23 var /*@type=num*/ v2 = super /*@target=Base::[]=*/ ['x'] = getNum();
21 var /*@type=int*/ v4 = super /*@target=Base::[]=*/ ['x'] ??= getInt(); 24 var /*@type=int*/ v4 = super /*@target=Base::[]=*/ ['x'] ??= getInt();
22 var /*@type=num*/ v5 = super /*@target=Base::[]=*/ ['x'] ??= getNum(); 25 var /*@type=num*/ v5 = super /*@target=Base::[]=*/ ['x'] ??= getNum();
23 var /*@type=int*/ v7 = super /*@target=Base::[]=*/ ['x'] += getInt(); 26 var /*@type=int*/ v7 = super /*@target=Base::[]=*/ ['x'] += getInt();
24 var /*@type=num*/ v8 = super /*@target=Base::[]=*/ ['x'] += getNum(); 27 var /*@type=num*/ v8 = super /*@target=Base::[]=*/ ['x'] += getNum();
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 var /*@type=double*/ v6 = super /*@target=Base::[]=*/ ['x'] ??= getDouble(); 140 var /*@type=double*/ v6 = super /*@target=Base::[]=*/ ['x'] ??= getDouble();
138 var /*@type=double*/ v7 = super /*@target=Base::[]=*/ ['x'] += getInt(); 141 var /*@type=double*/ v7 = super /*@target=Base::[]=*/ ['x'] += getInt();
139 var /*@type=double*/ v8 = super /*@target=Base::[]=*/ ['x'] += getNum(); 142 var /*@type=double*/ v8 = super /*@target=Base::[]=*/ ['x'] += getNum();
140 var /*@type=double*/ v9 = super /*@target=Base::[]=*/ ['x'] += getDouble(); 143 var /*@type=double*/ v9 = super /*@target=Base::[]=*/ ['x'] += getDouble();
141 var /*@type=double*/ v10 = ++super /*@target=Base::[]=*/ ['x']; 144 var /*@type=double*/ v10 = ++super /*@target=Base::[]=*/ ['x'];
142 var /*@type=double*/ v11 = super /*@target=Base::[]=*/ ['x']++; 145 var /*@type=double*/ v11 = super /*@target=Base::[]=*/ ['x']++;
143 } 146 }
144 } 147 }
145 148
146 main() {} 149 main() {}
OLDNEW
« no previous file with comments | « no previous file | pkg/front_end/testcases/inference/infer_assign_to_index_super_upwards.dart.direct.expect » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698