Chromium Code Reviews| Index: pkg/compiler/lib/src/elements/elements.dart |
| diff --git a/pkg/compiler/lib/src/elements/elements.dart b/pkg/compiler/lib/src/elements/elements.dart |
| index 6dab617092caeaa3eedb7790dd9680afcd9fd7cd..e4c0ab5f99efba2d144a94b700d510b7c59ed6a1 100644 |
| --- a/pkg/compiler/lib/src/elements/elements.dart |
| +++ b/pkg/compiler/lib/src/elements/elements.dart |
| @@ -532,7 +532,8 @@ class Elements { |
| static bool isInstanceSend(Send send, TreeElements elements) { |
| Element element = elements[send]; |
| if (element == null) return !isClosureSend(send, element); |
| - return isInstanceMethod(element) || isInstanceField(element); |
| + return isInstanceMethod(element) || isInstanceField(element) |
| + || send.isConditional; |
|
Siggi Cherem (dart-lang)
2015/05/22 03:50:49
this is because `A?.foo` is equivalent to `(A).foo
Johnni Winther
2015/05/22 12:39:48
Ack. Format like this:
return isInstanceMethod(el
Siggi Cherem (dart-lang)
2015/05/22 19:49:54
Done.
|
| } |
| static bool isClosureSend(Send send, Element element) { |
| @@ -640,7 +641,7 @@ class Elements { |
| static String constructOperatorNameOrNull(String op, bool isUnary) { |
| if (isMinusOperator(op)) { |
| return isUnary ? 'unary-' : op; |
| - } else if (isUserDefinableOperator(op)) { |
| + } else if (isUserDefinableOperator(op) || op == '??') { |
| return op; |
| } else { |
| return null; |
| @@ -666,6 +667,7 @@ class Elements { |
| if (identical(op, '&=')) return '&'; |
| if (identical(op, '^=')) return '^'; |
| if (identical(op, '|=')) return '|'; |
| + if (identical(op, '??=')) return '??'; |
| return null; |
| } |