Commit abdd536
committed
Java generic signatures can't refer to type members
- The PolyType case was dead code imported from Scala 2
- The HKTypeLambda case was correct for eta-expanded classes
(e.g. in t7932 `Category[Tuple2]` should get as signature
`Category<scala.Tuple2>`), but not for other type lambdas
where it could lead to type members appearing in the signature.
Fixed by splitting the case into an EtaExpansion case and
a case for all other HKTypeLambdas (which are just replaced
by a wildcard).
Fixes #15091.1 parent 1f4daea commit abdd536
File tree
3 files changed
+13
-5
lines changed- compiler/src/dotty/tools/dotc/transform
- tests/run
3 files changed
+13
-5
lines changedLines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| 169 | + | |
169 | 170 | | |
170 | 171 | | |
171 | 172 | | |
| |||
183 | 184 | | |
184 | 185 | | |
185 | 186 | | |
186 | | - | |
187 | | - | |
| 187 | + | |
| 188 | + | |
188 | 189 | | |
189 | | - | |
190 | | - | |
| 190 | + | |
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| 9 | + | |
| 10 | + | |
7 | 11 | | |
8 | 12 | | |
9 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
| |||
0 commit comments