File tree 2 files changed +12
-0
lines changed
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -424,6 +424,7 @@ enum MessageKind {
424
424
UNSUPPORTED_BANG_EQ_EQ ,
425
425
UNSUPPORTED_EQ_EQ_EQ ,
426
426
UNSUPPORTED_LITERAL_SYMBOL ,
427
+ UNSUPPORTED_OPERATOR ,
427
428
UNSUPPORTED_PREFIX_PLUS ,
428
429
MISSING_EXPRESSION_IN_THROW ,
429
430
UNTERMINATED_COMMENT ,
@@ -2473,6 +2474,10 @@ main() => A.A = 1;
2473
2474
"'!==' is not an operator. "
2474
2475
"Did you mean '#{lhs} != #{rhs}' or '!identical(#{lhs}, #{rhs})'?" ),
2475
2476
2477
+ MessageKind .UNSUPPORTED_OPERATOR : const MessageTemplate (
2478
+ MessageKind .UNSUPPORTED_OPERATOR ,
2479
+ "'#{operator}' is not an operator. " ),
2480
+
2476
2481
MessageKind .UNSUPPORTED_PREFIX_PLUS : const MessageTemplate (
2477
2482
MessageKind .UNSUPPORTED_PREFIX_PLUS , "'+' is not a prefix operator. " ,
2478
2483
howToFix: "Try removing '+'." ,
Original file line number Diff line number Diff line change @@ -457,6 +457,13 @@ class NodeListener extends ElementListener {
457
457
if (send == null || ! (send.isPropertyAccess || send.isIndex)) {
458
458
reportNotAssignable (node);
459
459
}
460
+ var tokenString = token.stringValue;
461
+ if (tokenString == '||=' || tokenString == '&&=' ) {
462
+ reporter.reportErrorMessage (reporter.spanFromToken (token),
463
+ MessageKind .UNSUPPORTED_OPERATOR , {'operator' : tokenString});
464
+ pushNode (arg);
465
+ return ;
466
+ }
460
467
if (send.asSendSet () != null ) internalError (node: send);
461
468
NodeList arguments;
462
469
if (send.isIndex) {
You can’t perform that action at this time.
0 commit comments