| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
This makes existsing uses of inline mostly compile.
Todo: Verify that stdlib can be compiled.
Todo: Implement accessors for assignments to priavte variables
Todo: Figure out what to do with accesses to private types.
|
|
|
|
| |
Also, do some refactorings and fix some bugs in Inliner.
|
|
|
|
|
| |
To be done: outer accessors
To be done: error positions
|
|
|
|
|
|
|
|
|
|
| |
Remove the code that implemented the encoding of hk types
using refinements.
Drop the notion that RefinedTypes can be type parameters. This is
no longer true under the new representation.
Also, refactoring MemberBinding -> TypeParamInfo
|
|
|
|
|
| |
- Re-introduce newHK option. Label some things that will be
removed with OLD.
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Simplify RefinedType
- Drop recursive definition of RefinedThis - this is now
taken over by RecType.
- Drop RefinedThis.
- Simplify typeParams
The logic avoiding forcing is no longer needed.
- Remove unused code and out of date comments.
|
|
|
|
|
|
|
| |
For the moment under newHK flag.
- avoid crasher in derivedTypeParams (NamedTypes don't always have symbols)
- Revise logic in type comparer for new HK scheme
|
| |
|
|
|
|
|
| |
The previous version seemed to fail non-deterministaically, but after a while
I could not reproduce it anymore. Anyway, leaving the change in.
|
|
|
|
|
| |
Partial fix of #765. Hack to make sure unexpandedName
works for super accessor names.
|
|
|
|
|
| |
LambdaTraits are created on demand; we need to make sure
they exist when referred to from Tasty.
|
|
|
|
|
|
|
|
| |
Add operations to NameOps to detect and produce names
for lazy locals.
@darkdimius Maybe there is already another way to do this?
I could not find it.
|
|
|
|
|
|
|
|
| |
Generalize overriding checking from isDefined
to all methods added by desugar to a case class.
None of these methods has an override so we
need to add one in case they do override another method
(previously we would flag this as an error).
|
| |
|
|
|
|
|
|
|
|
| |
These are not user-accessible types, so no need to follow
type convention and write in upper case.
Also, rename occurrences of lambda to Lambda, to make clear
we mean a type lambda.
|
|
|
|
| |
Used to create a separate field from trait setter, as the field name wasn't deconstructed.
|
|
|
|
|
| |
Avoid using unexpanded name because it can give wrong results for super accessors
of symbolic names. See #765. Without this commit t2183.scala crashes the compiler.
|
|\
| |
| | |
Ycheck that methods defined in ClassInfo exist in tree.
|
| | |
|
|/
|
|
|
| |
Creates a fresh name by appending a $N suffix. Takes care
of unwrapping/rewrapping module class suffixes.
|
|
|
|
|
|
|
|
| |
It did not do enough to carry its own weight, in particular because DenotationTransformers do have
a price - every encountered denotation in the whole program is passed through them. The name change
from <init> to $init$ was all it did, that is now rolled into Mixin.
Also renamed IMPLCLASS_CONSTRUCTOR to TRAIT_CONSTRUCTOR.
|
|
|
|
| |
Also: generalize expandedName so that it can cater for trait setters.
|
|
|
|
|
|
| |
Previously we could have returned true here yet a subsequent
lambdaArgIndex would fail with a Numberformat error. This scenario
is prevented now.
|
|
|
|
|
|
| |
- Merge flatName and fullNameSeparated
- Treat nested members of modules specially, to conform to scalac conventions
- Use `~` as separator for term members.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
In the absence of semantic names, this is kludgey. But we need to do it because
otherwise the ExpandedName flag is not correctly set.
|
|
|
|
|
| |
It's not used and is too low-level anyway. Expanded names should
be a semantic concept, the choice of separator is irrelevant.
|
|
|
|
| |
The new name is more consistent with the usage (e.g. NamedType#shadowed).
|
|
|
|
| |
... into a new trait "Skolemization".
|
| |
|
|
|
|
|
|
| |
Now: All new Array[T] methods are translated to calls of the form
dotty.Arrays.newXYZArray ...
|
|
|
|
| |
Separate test instead of inline.
|
|
|
|
|
| |
When inheriting from Scala2 traits we sometimes encounter names with a space at the end,
denoting a local variable. Drop the space because our translation scheme has no room for it.
|
|
|
|
| |
Trait getters are no longer needed.
|
|
|
|
| |
Needs adaptations in getters/setters before it can be tested.
|
|
|
|
| |
... and add a gettersSettersPhase to Context.
|
|
|
|
|
| |
Treat clone like the other primitive array operations, ensure it
returns a JavaArray.
|
|
|
|
|
|
|
|
| |
Main change: Introduce JavaArrayType as a new type constructor
for Java erased array. Translate all methods of Array class during
erasure to primitive operations on arrays.
Some other small fixes for more localized problems.
|
|
|
|
|
|
| |
1) Type parameter accessors inherit their variance from the type parameter
2) Copy method parameter defaults are annotated @uncheckedVariance. This is
necessary because default methods will be checked for variance.
|
|
|
|
|
| |
Added OverridingPairs
Small tweaks here and there.
|
|
|
|
|
| |
Rewrote SuperAccessors (more to be done; see comments), and
added stuff here and there to make it work smoother.
|
|
|
|
| |
Should do the same with other name-creator/name-test pairs.
|
|
|
|
| |
Guard every occurrence of name.head with a test whether name.length > 0
|
|
|
|
|
| |
Switch to the new scheme where higher-kinded types (and also some polymorphic
type aliases) are represented as instances of Lambda traits.
|
|
|
|
|
| |
Adding names and definitions for the Lambda scheme to hk types.
Also add HigherKinded flag for HK type parameters and abstract types.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In TypeAssigner#ensureAccible we sometimes pick an inherited public
member as the denotation of a NamedType instead of an inaccessible
private one. The problem is that both are denotations for the same type,
which caused a noDoubleBindings assert failure. We now solve this problem
by creating a "shadowed" named type to hold the inherited member.
The shadowed named type is distinguished by its name, which reads
(inherited)originalName
In the future, we should make this more robust by using a general
tagging scheme to create shadowed names.
Another fix is about import symbols. They are now referenced with
NonMemberTermRefs. With this fix, the test suite passes with no
double def violations.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Still missing: bridge method generation, signatures.
Other changes
- Turned around Checking and NoChecking. Checking is the default, NoChecking
disables it.
- Refactored Typer#typed to expose typedNamed, so that it can be overridden in
erasure.
- Made logging more forgiving wrt off-buy-one phase errors.
Conflicts:
src/dotty/tools/dotc/typer/Typer.scala
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(and also of t0625, which reappeared).
Several fixes were made. In summary:
1. Naming and representation of KigherKinded traits changed. It's now $HigherKinded$NIP where
the letters after the second $ indicate variance (N)egative, (I)nvariant, (P)ositive. The HKtraits
themselves are always non-variant in their parameters.
2. When deriving refined types over higher-kinded types, the variance of a type alias
is the variance of the new type constructor.
3. isSubTypeHK was changed, as was the position from where it is called.
4. appliedTo also works for PolyTypes.
|