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

Unified Diff: pkg/compiler/lib/src/resolution/send_resolver.dart

Issue 1185483004: Revert "Handle most qualified sends." (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/resolution/send_resolver.dart
diff --git a/pkg/compiler/lib/src/resolution/send_resolver.dart b/pkg/compiler/lib/src/resolution/send_resolver.dart
index fa8cacc84a854af5b1aa865542c45346a041c58a..2f13ed29a4594cf39def68042008b0064748dcc5 100644
--- a/pkg/compiler/lib/src/resolution/send_resolver.dart
+++ b/pkg/compiler/lib/src/resolution/send_resolver.dart
@@ -498,12 +498,11 @@ abstract class SendResolverMixin {
} else {
return new StaticAccess.superMethod(element);
}
- } else if (node.isConditional) {
+ } else if (node.isOperator || node.isConditional) {
// Conditional sends (e?.x) are treated as dynamic property reads because
// they are equivalent to do ((a) => a == null ? null : a.x)(e). If `e` is
// a type `A`, this is equivalent to write `(A).x`.
- return new DynamicAccess.ifNotNullProperty(node.receiver);
- } else if (node.isOperator) {
+ // TODO(johnniwinther): maybe add DynamicAccess.conditionalDynamicProperty
return new DynamicAccess.dynamicProperty(node.receiver);
} else if (Elements.isClosureSend(node, element)) {
if (element == null) {
« no previous file with comments | « pkg/compiler/lib/src/resolution/resolution_common.dart ('k') | pkg/compiler/lib/src/resolution/send_structure.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698