| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
(1) Type arguments now get a coordinate.
(2) They are labeled Override
(2) avoids having to special case TypeArgs in OverridingPairs.
|
|
|
|
|
|
|
| |
These may raise real errors, so we cannot exclude them from
overriding pairs a priori. But we can avoid reporting any
errors if other override errors were reported previously for
the same class.
|
|
|
|
| |
to make it easier to understand.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
Previously, two denotations with types => T and ()T could not
be merged, only their types could be, but then the denotation
would no longer be a SymDenotation. We now treat the two types
as equivalent so that it will select the symbol in a subclass.
This fixes a problem where, once overrding pairs are made to
work (see following commit), in core/Types we get an error "overriding
final method "hashCode".
|
|
|
|
|
|
|
|
|
|
| |
productArity is a method defined in ProductN which is inherited from
case classes. It is possible that it will be usewd in the implementation
of pattern matching in the future. The previous implementation used
the same name to mean something else: Not the arity of the case class
itself but the arity of the pattern/type it represented.
Renaming to prodArity avoids the confusion.
|
|
|
|
|
| |
Need to account for the possibility that function
arguments are wrapped in braces.
|
|
|
|
|
| |
State moved into local transforms which are allocated one per unit.
Thsi allows lambda lifters on different units to run in parallel.
|
|
|
|
| |
No global side effect on capturedVars anymore.
|
|
|
|
| |
Do not lead to temptation...
|
|
|
|
|
|
|
|
| |
Required some refactoring. Instead of transformSym we now
transform ValDefs as we prepare for them. The previous scheme
could not control directly whetrher transformSym or collectCaptured would
run first. Turns out that init ran before collectCaptured but
prepareForUnit did not, leading to test failures in pos/capturedvars.
|
|
|
|
|
|
|
| |
This allows to move to a functional implementation later.
Only exception: CapturedVars still uses init() because it
contains a (dubious!) interaction with intialization and
transformSym. Looking at this next.
|
|
|
|
| |
Should replace destructive inits.
|
|\
| |
| | |
Refactor/def trees
|
| | |
|
| |
| |
| |
| |
| | |
withMods should never be used to produce a typed tree, because typed
member defs get their modifiers from their symbols.
|
| |
| |
| |
| | |
Typed MemberDef trees now take the modifiers from their symbol's data.
|
| | |
|
|\ \
| | |
| | | |
Fix subtyping checks involving ThisType and PolyParam
|
| |/ |
|
|/
|
|
|
| |
Previously, one bucket was never used because in binary,
12*2^n - 1 = 101111...
|
|
|
|
|
|
|
|
|
|
| |
Previous implementation was confused about the meaning of interface (with default methods
or without?).
Now instead of Interface/JavaInterface we have
PureInterface - all members are abstract methods
NoInits - all members are methods
|
|
|
|
| |
It functionality is now all implemented in ExplicitOuter.
|
|\
| |
| | |
Transform/mixin
|
| |
| |
| |
| |
| |
| |
| | |
Previously, there was a switch in SymDenotation#termRef to create a WithFixedSym ref
when after erasure. This was done to fix a broken test, but it's clearly incomplete.
The scheme is now replaced by one which always creates WithFixedSym Termrefs after
erasure.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
Changes owners after a phase without copying the tree. This should be more
suitable for the changeOwner operations used in the tree transforms so far,
which are linear, i.e. no tree duplication is needed.
|
| | |
|
| |
| |
| |
| |
| |
| | |
Ig an implicit method has a result type which does not match the expected
type, the new case fires. We avoid to diagnose missing arguments, because
that's really confusing for an implicit method.
|
| |
| |
| |
| | |
Need to be treated like TermRefs.
|
| |
| |
| |
| | |
Needs a weakening of an assertion in assertErased
|
| |
| |
| |
| |
| |
| |
| | |
Split into two phases, ResolveSuper before Erasure and Mixin after. Likewise GettersSetters
is split into Getters and Memoize.
All tests pass, except two tests fail when compiled twice. Will investigate next why.
|
| |
| |
| |
| |
| | |
Now survives the case where a field is written x_=, dissumulating
a setter.
|
| | |
|
| | |
|
| |
| |
| |
| | |
Separate test instead of inline.
|
| |
| |
| |
| |
| |
| | |
1. Erase unit results in getters to BoxedUnit.
2. Erase => Unit to ()Unit; was ()BoxedUnit
3. Make sure ValDefs have same type in tpt as in symbol, analogous to DefDefs.
|
| |
| |
| |
| |
| | |
This is reasonable because getters are only generated late in the
compilation pipeline. No need to hide a getter as a val in error messages.
|
| | |
|
| |
| |
| |
| | |
Need to have Method flag set
|
| |
| |
| |
| |
| |
| |
| |
| | |
Otherwise we get binding races, e.g. for pos/t2133.scala after mixin
because we create same-named symbols in subclasses, and type refs now
can refer to the subclass symbol where previously they refereed to the
superclass symbol. To avoid a data race the new term ref will have a
fixed symbol.
|
| |
| |
| |
| |
| | |
Since we demand that after erasure all TermRefs are SymDenotations we need to
assure this when computing the denotations of term refs in new phases.
|
| |
| |
| |
| | |
Previous version could fail where the thisType widened to an explicit self type.
|
| |
| |
| |
| | |
Array types are no longer used after erasure, so the test was redundant.
|
| |
| |
| |
| |
| | |
After Mixin, super calls can appear in statemenr sequences. They need to be
typechecked and transformed using a special context.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Trait initializers do not have outer params; need to avoid passing
outer args to them.
This problem did not manifest itself before because no trait constructor calls
were generated before erasure.
|
| |
| |
| |
| | |
No more trait_setters are called.
|
| |
| |
| |
| |
| | |
The problem manifests itself when changing the owner of a class field. Being a ValDef,
this is classified as a weak owner. But it's parent (the class) should not be owner-changed.
|