|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Illegal class overrides are fundamentally at odds with the way dotty
represents types and therefore can cause lots of low-level problems.
Two measures in this commit
First, we detect direct illegal class overrides on completion instead of
during RefChecks. Break the override by making the previously
overriding type private.
This fixes i1750.scala, but still fails for indirect overrides between
two unrelated outer traits/classes that are inherited by the same class or trait.
We fix this by catching the previously thrown ClassCastException
in both ExtractAPI and RefChecks.
Test case for indirect overrides is in i1750a.scala.
|