-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit c4c48e3
Explain no expansion of ContextFunction0 (#23844)
Fixes #21321
Just an edge case.
I tried emitting `TypeMismatch` with addenda, but it didn't render, so
that was too much hassle just to add a string.
This is the existing notice; it doesn't indicate why it doesn't work.
```
2 |val v1: scala.ContextFunction0[String] = "x" // error
| ^^^
| Found: ("x" : String)
| Required: () ?=> String
```File tree
4 files changed
+32
-3
lines changed- compiler/src/dotty/tools/dotc/typer
- tests/neg
4 files changed
+32
-3
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3751 | 3751 |
| |
3752 | 3752 |
| |
3753 | 3753 |
| |
3754 | - | ||
3754 | + | ||
3755 | + | ||
3756 | + | ||
3757 | + | ||
3758 | + | ||
3759 | + | ||
3760 | + | ||
3761 | + | ||
3755 | 3762 |
| |
3756 | 3763 |
| |
3757 | 3764 |
| |
3758 | 3765 |
| |
3759 | - | ||
3760 | 3766 |
| |
3761 | 3767 |
| |
3762 | 3768 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
5 | - | ||
5 | + | ||
6 | 6 |
| |
7 | 7 |
| |
8 | 8 |
| |
|
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 | + | ||
16 | + | ||
17 | + | ||
18 | + | ||
19 | + |
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | + | ||
2 | + | ||
3 | + | ||
4 | + |
0 commit comments