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

Side by Side Diff: pkg/kernel/lib/transformations/insert_covariance_checks.dart

Issue 2623333005: Fix dispatch name of covariance-checked calls. (Closed)
Patch Set: Add test cases Created 3 years, 11 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 | tests/language_strong/covariant_subtyping_unsafe_call1_test.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 library kernel.transformations.insert_covariance_checks; 4 library kernel.transformations.insert_covariance_checks;
5 5
6 import '../class_hierarchy.dart'; 6 import '../class_hierarchy.dart';
7 import '../clone.dart'; 7 import '../clone.dart';
8 import '../core_types.dart'; 8 import '../core_types.dart';
9 import '../kernel.dart'; 9 import '../kernel.dart';
10 import '../log.dart'; 10 import '../log.dart';
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 497
498 @override 498 @override
499 visitLibrary(Library node) { 499 visitLibrary(Library node) {
500 if (!isTrustedLibrary(node)) { 500 if (!isTrustedLibrary(node)) {
501 node.visitChildren(this); 501 node.visitChildren(this);
502 } 502 }
503 } 503 }
504 504
505 @override 505 @override
506 visitMethodInvocation(MethodInvocation node) { 506 visitMethodInvocation(MethodInvocation node) {
507 node.interfaceTarget = getChecked(node.receiver, node.interfaceTarget); 507 var target = getChecked(node.receiver, node.interfaceTarget);
508 if (target != null) {
509 node.interfaceTarget = target;
510 node.name = target.name;
511 }
508 node.visitChildren(this); 512 node.visitChildren(this);
509 } 513 }
510 514
511 @override 515 @override
512 visitPropertySet(PropertySet node) { 516 visitPropertySet(PropertySet node) {
513 node.interfaceTarget = getChecked(node.receiver, node.interfaceTarget); 517 var target = getChecked(node.receiver, node.interfaceTarget);
518 if (target != null) {
519 node.interfaceTarget = target;
520 node.name = target.name;
521 }
514 node.visitChildren(this); 522 node.visitChildren(this);
515 } 523 }
516 } 524 }
OLDNEW
« no previous file with comments | « no previous file | tests/language_strong/covariant_subtyping_unsafe_call1_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698