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

Unified Diff: lib/src/checker/checker.dart

Issue 1038583004: Rationalize coercions (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Rebase Created 5 years, 9 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 | lib/src/checker/rules.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/checker/checker.dart
diff --git a/lib/src/checker/checker.dart b/lib/src/checker/checker.dart
index e88572ccb722d75115d2892c101fb0c9b4f50eb4..b5137fabd643ddb4e54f0756d12e36d82477a416 100644
--- a/lib/src/checker/checker.dart
+++ b/lib/src/checker/checker.dart
@@ -753,7 +753,9 @@ class CodeChecker extends RecursiveAstVisitor {
// compound operators in the int += num and num += dynamic cases.
staticInfo = DownCast.create(
_rules, expr.rightHandSide, Coercion.cast(rhsType, lhsType));
- expr.rightHandSide = staticInfo;
+ if (staticInfo is DownCast) {
+ expr.rightHandSide = staticInfo;
+ }
rhsType = lhsType;
} else {
// Static type error
« no previous file with comments | « no previous file | lib/src/checker/rules.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698