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

Unified Diff: pkg/analyzer/lib/src/task/strong/checker.dart

Issue 1804273003: Get rid of Coercion and Cast. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 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 | pkg/analyzer/lib/src/task/strong/info.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/task/strong/checker.dart
diff --git a/pkg/analyzer/lib/src/task/strong/checker.dart b/pkg/analyzer/lib/src/task/strong/checker.dart
index acf01ff9b4a0f044a607405403f188888c1ab400..53164a3323806b8b8ef5967fc34baf2a1a27210e 100644
--- a/pkg/analyzer/lib/src/task/strong/checker.dart
+++ b/pkg/analyzer/lib/src/task/strong/checker.dart
@@ -596,7 +596,7 @@ class CodeChecker extends RecursiveAstVisitor {
// This is also slightly different from spec, but allows us to keep
// compound operators in the int += num and num += dynamic cases.
staticInfo = DownCast.create(
- rules, expr.rightHandSide, new Cast(rhsType, lhsType));
+ rules, expr.rightHandSide, rhsType, lhsType);
rhsType = lhsType;
} else {
staticInfo = new StaticTypeError(rules, expr, lhsType);
@@ -689,7 +689,7 @@ class CodeChecker extends RecursiveAstVisitor {
// Downcast if toT <: fromT
if (rules.isSubtypeOf(toT, fromT)) {
- _recordMessage(DownCast.create(rules, expr, new Cast(fromT, toT)));
+ _recordMessage(DownCast.create(rules, expr, fromT, toT));
return;
}
@@ -704,7 +704,7 @@ class CodeChecker extends RecursiveAstVisitor {
// Iterable<T> for some concrete T (e.g. Object). These are unrelated
// in the restricted system, but List<dynamic> <: Iterable<T> in dart.
if (fromT.isAssignableTo(toT)) {
- _recordMessage(DownCast.create(rules, expr, new Cast(fromT, toT)));
+ _recordMessage(DownCast.create(rules, expr, fromT, toT));
}
}
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/task/strong/info.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698