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

Issue 1720083002: Report a static warning if a for loop condition is non-boolean. (Closed)

Created:
4 years, 10 months ago by Bob Nystrom
Modified:
4 years, 10 months ago
Reviewers:
Brian Wilkerson
CC:
reviews_dartlang.org
Base URL:
https://github.com/dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Report a static warning if a for loop condition is non-boolean. From 17.6.1: "It is a static warning if the static type of c may not be assigned to bool." Strong mode catches this case, but it looks like ErrorVerifier just missed it. Since I'm working on making strong mode lean on ErrorVerifier for finding sideways casts like this, the discrepancy popped up. R=brianwilkerson@google.com Committed: https://github.com/dart-lang/sdk/commit/e9a617548905cd2b5874ffd9940011a5ee41108f

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -2 lines) Patch
M pkg/analyzer/lib/src/generated/error_verifier.dart View 1 chunk +8 lines, -0 lines 0 comments Download
M pkg/analyzer/test/generated/static_type_warning_code_test.dart View 1 chunk +10 lines, -0 lines 0 comments Download
M tests/co19/co19-analyzer2.status View 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 5 (2 generated)
Bob Nystrom
4 years, 10 months ago (2016-02-22 19:31:01 UTC) #2
Brian Wilkerson
LGTM
4 years, 10 months ago (2016-02-22 19:37:52 UTC) #3
Bob Nystrom
4 years, 10 months ago (2016-02-22 20:10:57 UTC) #5
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
e9a617548905cd2b5874ffd9940011a5ee41108f (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698