| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
See #209 for explanation.
|
|
|
|
| |
Helps to track where erroneous type was created.
|
| |
|
|\
| |
| | |
Fix/overriding
|
| |
| |
| |
| |
| | |
Somehow this was lost in porting (or was this done somewhere else
in scalac?).
|
| |
| |
| |
| |
| |
| |
| | |
One test (t2613) required lifting a hard recursion limit in findMember
(used for debug only, will be removed in the future). The same test
also requires -Yno-deep-subtypes to be reset, so it's in pos_special
instead of pos.
|
|/
|
|
|
|
| |
ClassfileParser
Another bit to help avoid CyclicReferences when reading Java classes
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Needs a weakening of an assertion in assertErased
|
| |
|
|
|
|
|
| |
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.
|
|
|
|
| |
... by forwarding to Object. Without this, LambdaLift fails for core/Contexts.scala.
|
|
|
|
|
|
|
|
| |
... and these mappings have to be part of the applied substitutions.
Without the patch, the postCondition of FirstTransform fails for TreeInfo.scala and others,
because it selects symbols which are not defined in the mapped class.
Unrelated bugfix: JavaArray derives from Object.
|
| |
|
|
|
|
| |
Environment parameters do not count in th eresult type.
|
|
|
|
|
| |
1) strip TypeVars wehere necessary before widening
2) allow the combination of widening and dealiasing, in any order.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. They now keep track of changed constructors in templates, updating
the class scope as for other members.
2. Any changed members are now entered into the new class scope at exactly
the same position as the old one. That ensures that things like caseAccessors
still work.
3. ChangeOwners now is reflected in the prefixes of any named types.
4. Newly created classes now get their own ClassInfo type.
5. TreeTypeMaps always crete "fresh" symbols. Fresh symbols do not share
a NamedType reference with an existing reference to some other symbol.
This obviates b2e0e7b4, which will be reverted.
To make it work, the interface of TreeMap changed from an ownerMap function
to a substitution-like data structure working with two lists.
|
|
|
|
|
| |
Bring TermRefs in line with TypeRefs. Prefixes need to be kept so that termrefs
can be re-loaded in subsequent runs.
|
|
|
|
|
| |
The reason is that otherwise the non-private member super.x gets merged with the private member this.x
and that causes a double binding violation.
|
|
|
|
| |
Have a configurable printer to which cyclic error messages are sent.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Partial revert of 08c6eaca "this type is a term ref to the source module". The problem with
doing this is that it introduces spurious outer references. An inner module that contains
self referenves always needs the directly enclosing class. The revert avoids this dependency
by making ThisTypes always point to TypeRefs.
Several other changes were necessary to make the builds pass: TypeRefs had to get prefixes after
erasure so that they can be reloaded. Symbols of such typerefs had to be retrieved without forcing
a denotation.
One test (blockescapes.scala) fails and is moved to pending, awaiting further resolution.
Also two other new tests in pending which currently fail (and have failed before).
|
|
|
|
| |
Non member symbols should not be reloaded in any case.
|
|
|
|
|
| |
Defines a predicate isErasedTypes and checks that all tree types
and their widened underlying types are erased.
|
|
|
|
| |
And make its usage more systematic on all substitutions where it makes sense.
|
|
|
|
|
|
|
|
|
| |
This is done by predicating some shortcuts on tp.symbol.isStatic
where tp is a NamedType with the condition tp.denotationIsCurrent,
i.e. we avoid forcing the denotation. This safe because the branches
taken on isStatic are optimizations.
This commit contains the minimum set of changes to make showScala pass.
|
| |
|
|
|
|
| |
Made implementation conform to doc comment.
|
|
|
|
|
| |
This avoids stale symbol errors and does not need the somewhat
unsystematic symbol rebinding of the last commit.
|
|
|
|
|
|
|
|
|
|
|
| |
ThisTypes do escape. It seems that Scala 2 pickling produces ThisTypes that refer to base
classes of the class being compiled. If the base class is in a separate compilation unit,
this can lead to a stale class symbol in the ThisType. We solve this here by rebinding the
class symbol in the ThisType. We should also explore the alternative:
class ThisType(tref: TypeRef) ...
That would do the rebinding as part of the generation denotation resolution mechanism.
|
|
|
|
|
|
|
|
| |
Module classes now always get the sourceModule term ref as their this type.
We would like to eliminate ThisType() of a module class completely, as this
hangs on to a symbol which might become stale for globally accessible modules.
This commit is the first step. It contains the change to thisType and the necessary
fixes to make the test suite pass.
|
|
|
|
|
|
|
|
|
|
| |
Makes erasure pass the test suite.
Erasure is not yet turned turned on by default, because TestNonCyclic fails
with a stale symbol error. The problem is that This types are coupled to Symbols
and therefore don't reload. This is a problem is This types refer to static symbols
that get recompiled. We either have to drop using This types for static references,
or redefine thme so that can be reloaded.
|
|
|
|
|
|
|
|
| |
- Some types are different when erased (e.g. prefixes are NoPrefix)
- Some types are forbidden when erased. Put in assertions to check that fact.
Also, some renaming and doc comments to make creation of TermRefs and TypeRefs
clearer.
|
|
|
|
| |
... try to explain two tricky consequences of the denotation and signature model.
|
|
|
|
| |
Goes into a separate source files. Several simplifying refactorings.
|
|
|
|
|
|
|
|
|
| |
(1) Template nodes have to be treated specially. They contain
primary constructors, self definitions and local dummys,
all of which have to be properly mapped and re-integrated.
(2) Symbol substitutions have ot be done all together instead of
one after the other.
(3) When creating new symbols, need to create ClassSymbols for ClassSymbols.
|
|
|
|
|
|
| |
The previous version used `self` which referred to the `val` in
the implicit TypeOps value class (duh!). We really should make value
classes not require to have public fields.
|
|
|
|
|
| |
For overriding checks we need a concept where a val can match a def.
Normal matches does not provide this.
|
|
|
|
|
| |
New phase for Synthetic Method generation. Scala 2.x did it in Typer, but
it's cleaner to do it in a separate phase.
|
|
|
|
|
| |
Insert LazyRefs to break cycles for F-bounded types that
are unpickled or read from Java signatures.
|
|
|
|
|
|
|
|
|
|
| |
Cycles are now detected early, when an info is first completed.
Legal, f-bounded cycles are broken by a LazyRef, which will construct
its type lazily. This makes checkBounds validation of AppliedTypeTrees work
(in FirstTransform). Formerly, this stackoverflowed despite the laziness
precautions in findMember.
Todo: Do the same for class files coming from Java and Scala 2.x.
|
|
|
|
| |
Added method to traverse all parts of a type.
|
|
|
|
|
|
|
| |
Variance checking is now run as part of type-checking.
Fixed tests that exhibited variance errors. Added tests where some classes of
variance errors should be detected.
|
|
|
|
| |
... and moved to TypeApplications.
|
|
|
|
|
| |
Distinguish translations between Java and Scala varargs methods
and add bridges where needed.
|
|
|
|
|
|
|
| |
Having two repeated param classes (and two types) does not work,
because we need to maintain an overriding relationship between
Scala repeated param methods and Java repeated param methods (this
will be resolved later by bridges).
|
|
|
|
|
| |
Used in FullParameterization to substitute type parameters.
Fixes test failure for t2399.scala
|
|\
| |
| | |
Fix of FullParameterization
|