Commit a5e15ab
authored
Use result of lambda type of implicit in CheckUnused (#23497)
Fixes #23494
When inspecting unused implicit parameters, the check skips parameters
which are "marker traits". It tests for any members of the type (or its
upper bound) which are not "universal members". This commit uses the
`resultType` to avoid an error
```
invalid new prefix
```
while computing members where the type is a `LambdaType`.
A future improvement would be not to request `allMembers`, since the
check only needs to find one that is not universal.
The necessitating change was
2e4bc0a.1 parent 9396bbe commit a5e15ab
File tree
3 files changed
+22
-2
lines changed- compiler/src/dotty/tools/dotc/transform
- tests/warn
3 files changed
+22
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
926 | 926 | | |
927 | 927 | | |
928 | 928 | | |
929 | | - | |
| 929 | + | |
930 | 930 | | |
931 | 931 | | |
932 | 932 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
| 71 | + | |
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
| |||
84 | 86 | | |
85 | 87 | | |
86 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
87 | 92 | | |
88 | 93 | | |
89 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
0 commit comments