Commit 08cda24
Fix
Prior to this commit - a conditonal expression which used `is` to test against a type
parameter was treated as literal expression causing the lint to flag such conditions.
The actual type of a type parameter is not known for a program until a literal type is
substituted hence the flagging was a false-positive. This commit prevents such flagging.
Change-Id: I7b33510e83354fb652b159df452ed5063f51e875
Bug: #61903
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/461680
Commit-Queue: Samuel Rawlins <[email protected]>
Auto-Submit: Rohit Saily <[email protected]>
Reviewed-by: Brian Wilkerson <[email protected]>
Reviewed-by: Samuel Rawlins <[email protected]>literal_only_boolean_expressions is False-Positive1 parent b262f60 commit 08cda24
File tree
2 files changed
+32
-0
lines changed- pkg/linter
- lib/src/rules
- test/rules
2 files changed
+32
-0
lines changedLines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
34 | 39 | | |
35 | 40 | | |
36 | 41 | | |
| |||
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
221 | 248 | | |
222 | 249 | | |
223 | 250 | | |
| |||
0 commit comments