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

Unified Diff: pkg/analyzer/lib/src/generated/type_system.dart

Issue 1948293003: Issue 25914. Fix for compound assignments like 'T += T'. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/task/strong/checker.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/type_system.dart
diff --git a/pkg/analyzer/lib/src/generated/type_system.dart b/pkg/analyzer/lib/src/generated/type_system.dart
index f7d0e19872f0ddf06b05c11a8fa965f0166af8c2..954a7ef8428db6be3ef154c9c29e7a71db07198a 100644
--- a/pkg/analyzer/lib/src/generated/type_system.dart
+++ b/pkg/analyzer/lib/src/generated/type_system.dart
@@ -359,7 +359,10 @@ class StrongTypeSystemImpl extends TypeSystem {
leftType == rightType) {
if (operator == TokenType.PLUS ||
operator == TokenType.MINUS ||
- operator == TokenType.STAR) {
+ operator == TokenType.STAR ||
+ operator == TokenType.PLUS_EQ ||
+ operator == TokenType.MINUS_EQ ||
+ operator == TokenType.STAR_EQ) {
return leftType;
}
}
@@ -985,7 +988,11 @@ abstract class TypeSystem {
if (operator == TokenType.MINUS ||
operator == TokenType.PERCENT ||
operator == TokenType.PLUS ||
- operator == TokenType.STAR) {
+ operator == TokenType.STAR ||
+ operator == TokenType.MINUS_EQ ||
+ operator == TokenType.PERCENT_EQ ||
+ operator == TokenType.PLUS_EQ ||
+ operator == TokenType.STAR_EQ) {
DartType doubleType = typeProvider.doubleType;
if (rightType == doubleType) {
return doubleType;
@@ -996,7 +1003,12 @@ abstract class TypeSystem {
operator == TokenType.PERCENT ||
operator == TokenType.PLUS ||
operator == TokenType.STAR ||
- operator == TokenType.TILDE_SLASH) {
+ operator == TokenType.TILDE_SLASH ||
+ operator == TokenType.MINUS_EQ ||
+ operator == TokenType.PERCENT_EQ ||
+ operator == TokenType.PLUS_EQ ||
+ operator == TokenType.STAR_EQ ||
+ operator == TokenType.TILDE_SLASH_EQ) {
if (rightType == intType) {
return intType;
}
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/task/strong/checker.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698