Commit 85d55e7
authored
Since the param types come from type arguments to
`ContextFunctionN[...]`, nothing prevents them a priori from being
wildcard type params, i.e., `TypeBounds`. However, that is not a valid
type to give to a concrete term param.
We can arbitrarily choose any type that conforms to the bounds, which
realistically means one of the two bounds. Since type inference already
chooses the lower bound when explicitly writing the context function, we
align and choose the lower bound when materializing it.
File tree
3 files changed
+16
-1
lines changed- compiler/src/dotty/tools/dotc
- transform
- typer
- tests/pos
3 files changed
+16
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
581 | 581 | | |
582 | 582 | | |
583 | 583 | | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
584 | 592 | | |
585 | 593 | | |
586 | 594 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3242 | 3242 | | |
3243 | 3243 | | |
3244 | 3244 | | |
3245 | | - | |
| 3245 | + | |
3246 | 3246 | | |
3247 | 3247 | | |
3248 | 3248 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
0 commit comments