Commit f408864
committed
Declare the type of the list being bound
listValue is assigned from two branches and read a few lines later, and being
declared def left its element type to inference. IntelliJ gives up and reports
the item as `?`, which makes item.getClass() in the loop below look unresolved
even though it compiles.
Declaring it List answers that where the value is introduced, rather than
casting at the point of use — the array and Map branches ask the same question
of their items with no cast, and matching them is the point of this change.1 parent cf5c82d commit f408864
1 file changed
Lines changed: 1 addition & 1 deletion
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
505 | 505 | | |
506 | 506 | | |
507 | 507 | | |
508 | | - | |
| 508 | + | |
509 | 509 | | |
510 | 510 | | |
511 | 511 | | |
| |||
0 commit comments