Commit 7c4bd67
committed
Compensate loss of transitivity
We only have transitivity between givens or between implicits. To cope with that
- We tank first all implicits, giving a best implicit search result.
- Then we rank all givens startign with the implicit result. If there is
a given that is better than the best implicit, the best given will be chosen.
Otherwise we will stick with the best implicit.1 parent 35b5f7c commit 7c4bd67
File tree
2 files changed
+28
-3
lines changed- compiler/src/dotty/tools/dotc/typer
- tests/pos
2 files changed
+28
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1381 | 1381 | | |
1382 | 1382 | | |
1383 | 1383 | | |
1384 | | - | |
1385 | | - | |
1386 | 1384 | | |
1387 | 1385 | | |
1388 | 1386 | | |
| |||
1622 | 1620 | | |
1623 | 1621 | | |
1624 | 1622 | | |
1625 | | - | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
1626 | 1638 | | |
1627 | 1639 | | |
1628 | 1640 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
0 commit comments