| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Closes #241 -- that took a while!
|
|
|
|
|
|
|
| |
We now get a cyclic reference when inheriting from an inner class
with the same name in an outer supertype. Since this was legal
in Scala2 it's good to explain that particular case. Test case
in overrideClass.scala
|
|
|
|
|
|
|
|
|
| |
This is needed to ensure that the type of a definition node
(ValDef, TypeDef, or DefDef) always refers to the symbol of
that definition.
Caused a spurious error in selfReq to go away (so error count was
updated).
|
| |
|
|
|
|
| |
Overriding pairs needs to match ExprTypes with field types. Closes #329.
|
| |
|
|
|
|
| |
These tests work correctly since 222e9a478f7b851582550973df6a9d141766e49a
|
|
|
|
|
| |
Somehow this was lost in porting (or was this done somewhere else
in scalac?).
|
|
OverridingPairs had several bugs which caused pairs to be lost, which caused
missing overrides checks. Fixing OverridingPairs revealed several test failures
(and a problem in Synthetics generation which was fixed in the last commit).
Tests that became negative are all moved into neg/overrides.scala, and the
original versions in pos were fixed.
|