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

Unified Diff: pkg/analyzer/test/src/task/strong/front_end_inference_test.dart

Issue 2926763003: Add type inference for complex assignments whose LHS is an index expression. (Closed)
Patch Set: Created 3 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/analyzer/test/src/task/strong/front_end_inference_test.dart
diff --git a/pkg/analyzer/test/src/task/strong/front_end_inference_test.dart b/pkg/analyzer/test/src/task/strong/front_end_inference_test.dart
index 9a078bc3ce8f1e8d055307e2c8cd6b3645783017..434e7cbc1f04e16483be7cb4183da253f56a2ca2 100644
--- a/pkg/analyzer/test/src/task/strong/front_end_inference_test.dart
+++ b/pkg/analyzer/test/src/task/strong/front_end_inference_test.dart
@@ -7,6 +7,7 @@ import 'dart:convert';
import 'dart:io';
import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/token.dart';
import 'package:analyzer/dart/ast/visitor.dart';
import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/dart/element/type.dart';
@@ -450,7 +451,10 @@ class _InstrumentationVisitor extends RecursiveAstVisitor<Null> {
visitPrefixExpression(PrefixExpression node) {
super.visitPrefixExpression(node);
- _recordTarget(node.operator.charOffset, node.staticElement);
+ if (node.operator.type != TokenType.PLUS_PLUS &&
+ node.operator.type != TokenType.MINUS_MINUS) {
+ _recordTarget(node.operator.charOffset, node.staticElement);
+ }
}
@override

Powered by Google App Engine
This is Rietveld 408576698