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

Unified Diff: runtime/vm/parser.cc

Issue 1568353002: Don't test directly against Scanner::kNoSourcePos instead use >= 0. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 | « runtime/vm/flow_graph_compiler_x64.cc ('k') | 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 0c4a59e0fae235a1270207b21be9f7af6a4984dd..d2848793c6095d56f3ef5ddab9259fc2a3b43c69 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -7567,7 +7567,7 @@ AstNode* Parser::ParseVariableDeclaration(const AbstractType& type,
ASSERT(current_block_ != NULL);
const intptr_t previous_pos =
current_block_->scope->PreviousReferencePos(ident);
- if (previous_pos != Scanner::kNoSourcePos) {
+ if (previous_pos >= 0) {
ASSERT(!script_.IsNull());
if (previous_pos > ident_pos) {
ReportError(ident_pos,
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698