| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
More magic is needed, as enumerating array symbols does not work in backend.
|
|
|
|
|
| |
Call drop method directly if class derives from sequence.
I do not understand how callRuntime works in scalac. Calling this method requires implicit search.
|
|
|
|
|
|
| |
They used to be discoverable using repeatedType, but ElimRepeated eliminates it.
Instead I'm using internal synthetic Typed nodes name, similar to how it's done for non-star Wildcards.
This makes handling Wildcards and Wildacard_Star more symmetric in patmat.
|
|
|
|
|
|
|
|
| |
If an inner class has proxy fields, we missed so far the assignment sfrom
the proxy parameters in the primary constructor of the class to the proxy
fields.
Test case tries several variations of this.
|
|
|
|
| |
Even if an explicit outer accessor was a method, it got a TermRef as type.
|
|\
| |
| | |
Add/trait parameters
|
| |
| |
| |
| |
| |
| | |
Lazy Scala2 fields and trait parameters touched the same code in Mixin and the merge
dropped essential logic. Also cleaned up some of the code having to do with lazy
Scala2 fields.
|
| | |
|
| |
| |
| |
| |
| |
| | |
Reason: The ParamAccessor flag will be reset later in Mixin. We do not
want to rewrite the references to a trait parameter accessor then, so it's
better to generate all references with a `this.` prefix from the start.
|
| |
| |
| |
| |
| | |
Parameter accessors in traits have the ParamAccessor flag removed
in the Mixin transformSym method.
|
| |
| |
| |
| |
| |
| |
| | |
(reverted from commit 2c559003534d4441688bcf1664e53993c6187bde)
Mixin should drop the ParamAccessor flag anyway in traits, so there is no
need to mask it when creating implementations of trait definitions.
|
| |
| |
| |
| |
| |
| | |
Add necessary logic to Mixin. Also add tests
that all parameterized traits are called with
parameters set.
|
| |
| |
| |
| |
| | |
A parent trait may not be parameterized (as in T()) if the calling class does not
directly implement that trait.
|
| |
| |
| |
| | |
Need to suppress the flag when copying symbols.
|
|\ \
| |/
|/| |
Change/simplify tasty
|
| | |
|
| |
| |
| |
| |
| | |
Replace by ABSTRACT and OVERRIDE. No need to expose the representation detail
that they are a single flag.
|
| |
| |
| |
| |
| |
| |
| | |
SkolemTypes are no longer needed when Pickling because they exist only
for checking type-safety. After the typer, we can safely eliminate them.
Not having skolem types in TASTY simplifies the format and avoids having
to explain a difficult concept.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Shadowing tests could go into an infinite recursion when
the found sahdwoing member itself needs an implicit that
is resolved and then shadowed again by the same member.
A test case is neg/arrayclone-new.scala. This caused
a SO before, now gives two errors.
|
|\ \
| |/
|/| |
Fix #643 - Scala2 unpickling now sets NoInits flag for interfaces.
|
| |
| |
| |
| |
| | |
NoInits is implied for pure interfaces, so has to be set. The Java classfile parser
already does the right thing here.
|
| |
| |
| |
| |
| | |
Instead of classifying class members with a TreeInfo.DefKind, we
use directly the flags into which kinds were previously translated.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The previous stale symbol was discovered because NormalizeFlags looks
at all declarations of a MoInits trait in the SymTransformer. I.e it does
this for all no-init traits, whether loaded from a classfile or currently
compiled. This is wasteful because it forces too many definitions.
The new scheme drops the scan in favor of producing PureInterface
together with NoInits. PureInterface is already read as a flag from
Java snd Scala2 classfiles. For source and Tasty it is now generated
as members are indexed.
|
| |
| |
| |
| |
| | |
Found while trying to chase down the problem with stale symbols in last commit. Double negation
is confusing. The new formulation avoids it.
|
| |
| |
| |
| |
| |
| |
| | |
Refinement classes and their members could give spurious stale symbol errors if the
symbol is loaded in a different run than the classfile containing it. The problem
is that refinement classes do not form part of the scope of their owners. The fix
assumes that refinement classes are always "stillValid".
|
|\ \
| | |
| | | |
Refactorings for small style improvements.
|
| | | |
|
|\ \ \
| | | |
| | | | |
Tighten comparison of skolem types
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We want to establish the invariant (optionally checked by assertNoSkolems)
that symbols do not contain skolemized types as their info. This avoids unsoundness situations
where a skolem gets exported as part if the result type of a method, so different instantiations
look like their are the same instance.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Skolemize unstable prefixes in asSeenFrom provided
- the prefix appears at least once in non-variant or contra-variant position
- we are in phase typer.
After typer, we have already established soundness, so there's no need to
do skolemization again. We can simply do the (otherwise unsound) substitution
from this-type to prefix.
|
| | | |
| | | |
| | | |
| | | | |
It's no longer needed in TypeComparer. We now deskolemize when locally inferring types of vals and defs.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
Skolem[T] != Skolem[T]
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
SkolemTypes need to behave differently form RefinedThis types in TypeMap
and TypeAccumulator. For skolem types these should follow through to the
underlying type. For RefinedThis types, these need to do nothing, in order
not to start an infinite recursion.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Will use deskolemize later, when method result types
are inferred.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
(1) Refinements of stable types are stable
(2) TypeVars instantiated to stable types are stable.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Be more aggressive doing this than with lookupRefined in that we compute
the member of a projected name, instead of just analyzing the type structurally.
Reason: (1) If we do not follow aliases, skolemization will lose information
(2) Skolemization is applied rather late, less risk of cyclic references by
computing members.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
A term ref is stable only if its prefix is also stable. At the same time, we
drop stability requirements where they no longer make sense (e.g. in isLegalPrefix).
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Skolem types are =:= only if they are reference-equal. Two skolem types
with the same underlying type are not necessarily equal.
Tests continue to run under this tightened definition.
|
|\ \ \ \
| |_|_|/
|/| | | |
Enable tests that pass, move macro tests to disabled.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
implementation method.
Cannot rely on it. Instead use method signature.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Unlike normal fields, they aren't initialised in $init method, and need to know a bit about class layout of implementation class.
Luckily AugmentScala2Traits added just enough symbols to make this work.
|
| | | |
| | | |
| | | |
| | | | |
Scala-2 lazy vals are @volatile according to Dotty conventions.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Methods like + can have multiple parameters. In that case
+= also takes multiple parameters.
|
|\| | |
| |_|/
|/| | |
Some fixes around mixin and memoization
|