Commit 7f78751
committed
Disallow opaque type aliases of context functions
We could allow them but they would not do what one probably expects (i.e. create
context closures). This is because abstract types upper-bounded by context functions
don't do that either (see neg/i16035a.scala), and we have to keep semantic equivalence
between the two.
Therefore, it's better to disallow them.
Fixes #160351 parent a503b7a commit 7f78751
File tree
7 files changed
+49
-1
lines changed- compiler/src/dotty/tools/dotc
- transform
- typer
- docs/_docs/reference/other-new-features
- tests
- neg
- pos
7 files changed
+49
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
389 | | - | |
| 389 | + | |
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1460 | 1460 | | |
1461 | 1461 | | |
1462 | 1462 | | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
1463 | 1471 | | |
1464 | 1472 | | |
1465 | 1473 | | |
| |||
1495 | 1503 | | |
1496 | 1504 | | |
1497 | 1505 | | |
| 1506 | + | |
1498 | 1507 | | |
1499 | 1508 | | |
1500 | 1509 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2417 | 2417 | | |
2418 | 2418 | | |
2419 | 2419 | | |
| 2420 | + | |
2420 | 2421 | | |
2421 | 2422 | | |
2422 | 2423 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
0 commit comments