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 2f13ed29a4594cf39def68042008b0064748dcc5..fa8cacc84a854af5b1aa865542c45346a041c58a 100644 |
--- a/pkg/compiler/lib/src/resolution/send_resolver.dart |
+++ b/pkg/compiler/lib/src/resolution/send_resolver.dart |
@@ -498,11 +498,12 @@ abstract class SendResolverMixin { |
} else { |
return new StaticAccess.superMethod(element); |
} |
- } else if (node.isOperator || node.isConditional) { |
+ } else if (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`. |
- // TODO(johnniwinther): maybe add DynamicAccess.conditionalDynamicProperty |
+ return new DynamicAccess.ifNotNullProperty(node.receiver); |
+ } else if (node.isOperator) { |
return new DynamicAccess.dynamicProperty(node.receiver); |
} else if (Elements.isClosureSend(node, element)) { |
if (element == null) { |