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

Side by Side Diff: pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart

Issue 2946733003: Fix type inference of getters that "override" setters and vice versa. (Closed)
Patch Set: Address code review comments 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 /// This file declares a "shadow hierarchy" of concrete classes which extend 5 /// This file declares a "shadow hierarchy" of concrete classes which extend
6 /// the kernel class hierarchy, adding methods and fields needed by the 6 /// the kernel class hierarchy, adding methods and fields needed by the
7 /// BodyBuilder. 7 /// BodyBuilder.
8 /// 8 ///
9 /// Instances of these classes may be created using the factory methods in 9 /// Instances of these classes may be created using the factory methods in
10 /// `ast_factory.dart`. 10 /// `ast_factory.dart`.
(...skipping 1260 matching lines...) Expand 10 before | Expand all | Expand 10 after
1271 void set _typeInferrer(KernelTypeInferrer value); 1271 void set _typeInferrer(KernelTypeInferrer value);
1272 1272
1273 void setInferredType( 1273 void setInferredType(
1274 TypeInferenceEngineImpl engine, String uri, DartType inferredType); 1274 TypeInferenceEngineImpl engine, String uri, DartType inferredType);
1275 1275
1276 static FieldNode getFieldNode(Member member) { 1276 static FieldNode getFieldNode(Member member) {
1277 if (member is KernelMember) return member._fieldNode; 1277 if (member is KernelMember) return member._fieldNode;
1278 return null; 1278 return null;
1279 } 1279 }
1280 1280
1281 static void recordCrossOverride(
1282 KernelMember member, Member overriddenMember) {
1283 if (member._fieldNode != null) {
1284 member._fieldNode.crossOverrides.add(overriddenMember);
1285 }
1286 }
1287
1281 static void recordOverride(KernelMember member, Member overriddenMember) { 1288 static void recordOverride(KernelMember member, Member overriddenMember) {
1282 if (member._fieldNode != null) { 1289 if (member._fieldNode != null) {
1283 member._fieldNode.overrides.add(overriddenMember); 1290 member._fieldNode.overrides.add(overriddenMember);
1284 } 1291 }
1285 } 1292 }
1286 } 1293 }
1287 1294
1288 /// Shadow object for [MethodInvocation]. 1295 /// Shadow object for [MethodInvocation].
1289 class KernelMethodInvocation extends MethodInvocation 1296 class KernelMethodInvocation extends MethodInvocation
1290 implements KernelExpression { 1297 implements KernelExpression {
(...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after
2221 } 2228 }
2222 2229
2223 transformChildren(v) { 2230 transformChildren(v) {
2224 return internalError("Internal error: Unsupported operation."); 2231 return internalError("Internal error: Unsupported operation.");
2225 } 2232 }
2226 2233
2227 visitChildren(v) { 2234 visitChildren(v) {
2228 return internalError("Internal error: Unsupported operation."); 2235 return internalError("Internal error: Unsupported operation.");
2229 } 2236 }
2230 } 2237 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698