Commit 32a10d5
committed
Consistent override checking
In 7964d17,
`OverridingPairs.Cursor#matches` was changed to use Denotations#matches
instead of Types#matches to make the override check more precise, but
the same was not done in
`RefChecks#checkAllOverrides#hasMatchingSym#isSignatureMatch`, which
lead to inconsistencies: in the added testcase, the definition of `foo`
in `B` doesn't override anything, but because OverridingPairs and
RefChecks disagreed on what an override was, that did not produce any
error.1 parent dfcc0b1 commit 32a10d5
File tree
2 files changed
+10
-2
lines changed- compiler/src/dotty/tools/dotc/typer
- tests/neg
2 files changed
+10
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
762 | 762 | | |
763 | 763 | | |
764 | 764 | | |
765 | | - | |
766 | | - | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
767 | 769 | | |
768 | 770 | | |
769 | 771 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
0 commit comments