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

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

Issue 2956243003: Fix inferMethodInvocation in the case where interfaceMember is null. (Closed)
Patch Set: Created 3 years, 5 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/lib/src/fasta/type_inference/type_inferrer.dart » ('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 /// 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 1811 matching lines...) Expand 10 before | Expand all | Expand 10 after
1822 @override 1822 @override
1823 void _collectDependencies(KernelDependencyCollector collector) { 1823 void _collectDependencies(KernelDependencyCollector collector) {
1824 // Super expressions should never occur in top level type inference. 1824 // Super expressions should never occur in top level type inference.
1825 // TODO(paulberry): but could they occur due to invalid code? 1825 // TODO(paulberry): but could they occur due to invalid code?
1826 assert(false); 1826 assert(false);
1827 } 1827 }
1828 1828
1829 @override 1829 @override
1830 DartType _inferExpression( 1830 DartType _inferExpression(
1831 KernelTypeInferrer inferrer, DartType typeContext, bool typeNeeded) { 1831 KernelTypeInferrer inferrer, DartType typeContext, bool typeNeeded) {
1832 inferrer.instrumentation?.record(Uri.parse(inferrer.uri), fileOffset, 1832 if (interfaceTarget != null) {
1833 'target', new InstrumentationValueForMember(interfaceTarget)); 1833 inferrer.instrumentation?.record(Uri.parse(inferrer.uri), fileOffset,
1834 'target', new InstrumentationValueForMember(interfaceTarget));
1835 }
1834 return inferrer.inferMethodInvocation(this, new KernelThisExpression(), 1836 return inferrer.inferMethodInvocation(this, new KernelThisExpression(),
1835 fileOffset, false, typeContext, typeNeeded, 1837 fileOffset, false, typeContext, typeNeeded,
1836 interfaceMember: interfaceTarget, 1838 interfaceMember: interfaceTarget,
1837 methodName: name, 1839 methodName: name,
1838 arguments: arguments); 1840 arguments: arguments);
1839 } 1841 }
1840 } 1842 }
1841 1843
1842 /// Shadow object for [SuperPropertyGet]. 1844 /// Shadow object for [SuperPropertyGet].
1843 class KernelSuperPropertyGet extends SuperPropertyGet 1845 class KernelSuperPropertyGet extends SuperPropertyGet
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
2355 } 2357 }
2356 2358
2357 transformChildren(v) { 2359 transformChildren(v) {
2358 return internalError("Internal error: Unsupported operation."); 2360 return internalError("Internal error: Unsupported operation.");
2359 } 2361 }
2360 2362
2361 visitChildren(v) { 2363 visitChildren(v) {
2362 return internalError("Internal error: Unsupported operation."); 2364 return internalError("Internal error: Unsupported operation.");
2363 } 2365 }
2364 } 2366 }
OLDNEW
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698