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

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

Issue 1122313002: Typing fixes to eliminate casts/dcalls (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Rebase Created 5 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 | « lib/runtime/dart/core.js ('k') | test/checker/checker_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/checker/rules.dart
diff --git a/lib/src/checker/rules.dart b/lib/src/checker/rules.dart
index b406b9f6e930cebe06425f42cc41e4dfa6068ae9..f77f77ef4802c6b58956ba16969b48a0ba052551 100644
--- a/lib/src/checker/rules.dart
+++ b/lib/src/checker/rules.dart
@@ -613,6 +613,9 @@ class DownwardsInference {
if (e is ConditionalExpression) {
return _inferConditionalExpression(e, t, errors);
}
+ if (e is ParenthesizedExpression) {
+ return _inferParenthesizedExpression(e, t, errors);
+ }
if (e is Conversion) return _inferExpression(e.node, t, errors);
if (rules.isSubTypeOf(rules.getStaticType(e), t)) return true;
if (cast && rules.getStaticType(e).isDynamic) {
@@ -717,6 +720,11 @@ class DownwardsInference {
_inferExpression(e.elseExpression, t, errors);
}
+ bool _inferParenthesizedExpression(
+ ParenthesizedExpression e, DartType t, errors) {
+ return _inferExpression(e.expression, t, errors);
+ }
+
bool _inferInstanceCreationExpression(
InstanceCreationExpression e, DartType t, errors) {
var arguments = e.argumentList.arguments;
« no previous file with comments | « lib/runtime/dart/core.js ('k') | test/checker/checker_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698