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

Unified Diff: runtime/vm/parser.cc

Issue 2411303003: Remove redundant code in parser. (Closed)
Patch Set: Created 4 years, 2 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index cb9c620101ec318ff2baffb48bf4f5a698cea49e..91c5803c711e603183ceec4c8067db3d3642ec47 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -10999,9 +10999,7 @@ AstNode* Parser::ParseBinaryExpr(int min_preced) {
right_operand = new(Z) TypeNode(type_pos, type);
// In production mode, the type may be malformed.
// In checked mode, the type may be malformed or malbounded.
- if (((op_kind == Token::kIS) || (op_kind == Token::kISNOT) ||
- (op_kind == Token::kAS)) &&
- type.IsMalformedOrMalbounded()) {
+ if (type.IsMalformedOrMalbounded()) {
// Note that a type error is thrown in a type test or in
// a type cast even if the tested value is null.
// We need to evaluate the left operand for potential
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698