| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
Lots of other changes to make positions work out everywhere.
One important change is that now trees can be shared, just
as types can. This change improves memory requirements (a bit)
and also makes positions in shared trees more robust.
|
|\
| |
| | |
Fix Tasty positions
|
| |
| |
| |
| |
| | |
Don't convert to a TypeTree in PostTyper, because that
loses internal positions.
|
| |
| |
| |
| |
| | |
Since we now transform all type trees, no need to have
a separate traversal for checking.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We need to keep the original expressions around
for accurate linking with the source file. That holds
also if the expression has a constant type, so it should
not be converted to a literal before pickling.
Instead it will be converted in FirstTransform.
|
| |
| |
| |
| |
| |
| | |
If we want to pickle types with positions we should not
converyt to TypeTrees before pickling. Instead, type trees
are now converted to TypeTrees in FirstTransform.
|
| | |
|
| | |
|
|/
|
|
| |
This commit also fixes #1583.
|
|
|
|
|
| |
To be done: outer accessors
To be done: error positions
|
|
|
|
|
|
|
|
|
| |
Now it's annotated first, annotation second.
This is in line with AnnotatedType and in line with the principle
that tree arguments should come in the order they are written. The
reason why the order was swapped before is historical - Scala2 did it
that way.
|
|\
| |
| | |
Clean up config.Printers imports
|
| |
| |
| |
| | |
And remove the not used Printer#echo
|
|/
|
|
|
|
|
|
| |
This commit removes a problematic duplicated `checkBounds` call on `TypeApply`.
To verify correctness of this change on has to check that `normalizeTree` used only once [1],
and the function using `normalizeTree` already takes care of calling `checkBounds`.
[1]: https://github.com/lampepfl/dotty/blob/0e8f05d88bfef95fac59f522fd9d06792126bd11/src/dotty/tools/dotc/transform/PostTyper.scala#L205
|
| |
|
|
|
|
|
| |
Allows us to drop also the involved knownHK method. Lots of other
cleanups.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Taking the signature over a type with uninstantiated type variables
means that the signature can change later, once we instantiate the
type variable. We handle this by recording uninstantiated positions
of signatures and fixing them in PostTyper, when type variables are
instantiated.
- This allows to drop the kludge of "normalizing" in derivedRefinedType
Dropping this initially revealed the problems with under-determined
signatures. Now that these problems are fixed, we can drop for good.
|
|
|
|
|
|
|
| |
Make them each inherit from common BaseType GenericType.
That way we avoid inheriting accidentally stuff from PolyType in TypeLambda.
Also, Fix adaptation of type lambdas. Don't confuse them with PolyTypes.
|
|
|
|
|
|
|
|
| |
This leads to an infinite cycle when trying to unpickling, because
the modifiers and annotations of a symbol are read before the symbol
itself is created.
See #1212 for the general case.
|
|
|
|
|
|
|
| |
Instead of separate source file sections, pickle SourceFile as an
annotation of all toplevel classes.
We represent it like this anyway when reading back Tasty-defined classes.
|
|
|
|
|
|
|
|
|
| |
CheckNotPrivate now avoids private aliases, so that types sat prepresentable in
transformation phases.
This does not solve the problem that private classes or abstract types might leak coming
from Scala 2, but there is not really a good cure for that. We can reject them outright or
allow them under language:Scala2 and hope for the best.
|
|\
| |
| | |
Fix #997
|
| |
| |
| |
| | |
Also: include a test that private aliases are transparent.
|
| |
| |
| |
| | |
First version. Fixes #997.
|
| |
| |
| |
| | |
Lets one also pass named arguments to methods.
|
|/
|
|
|
| |
Types#underlyingClassRef and PostTyper#normalizeTree need to be changed so they can
deal with partial named parameter lists.
|
|
|
|
|
|
|
| |
Move logic from TypeOps to new file CheckRealizable.scala.
Also check realizable fields under strict mode.
Check at phase PostTyper rather than Typer to avoid cycles.
New tests for imports and deep paths.
|
|
|
|
|
|
|
|
| |
Previously, bounds of a TypeDef tree were not checked. We now make
sure bounds are checked everywhere in PostTyper. The previous
partial check in Applications gets removed (it was not complete
even for TypeApplications because sometimes bounds were not yet
known when the test was performed.)
|
|
|
|
|
| |
This is important for IDEs who want to see the full tree.
The tree now gets replaced by a TypeTree in PostTyper.
|
|
|
|
|
|
|
|
|
| |
ParamForwarding converts some parameters to nullary methods, yet
it does not update the references to these parameters. Their signature
is still NotAMethod, which is wrong. Causes subtle differences in
peckle tests: a param accessor get type T before pickling (which is
wrong), gets => T when reading back (which is right). Test case in
pickling/selfSym.scala.
|
|
|
|
|
|
|
|
|
| |
The fact that the annotation comes first is weird, because when I write
an annotated type it's <type> @<annotation>. Also, annotated types
are like RefinedTypes in that they derive from a parent type. And in
RefinedTypes the parent comes first.
So swapping the arguments improves consistency.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Now, PostTyper replaces constant expressions with literals. If we wait any longer
then any tree rewriting of an application node would have to do constant folding again,
which is a hassle.
With the previous late Literalize phase, constant expressions consisting of operations
and arguments lost their constantness in PostTyper.
|
|
|
|
|
|
|
|
|
|
| |
object as owner and be followed by type arguments:
reflect.classTag[T]
expands to
reflect.`package`.classTag[T]
|
|
|
|
|
| |
I have figured out how to make this the default in Eclipse, so hopefully
we won't see many repeats of this.
|
|
|
|
|
| |
Everything that needs to be done before pickling moves to PostTyper.
The idea is that we want to make Pickler come before FirstTransform.
|
| |
|
|
|
|
|
| |
Move InstChecks functionality into PostTyper in order
to save a separate traversal.
|
|
New phase: PostTransform, runs after Typer.
SuperAccessors and ParamForwarders (renamed from ForwardParamAccessors) are
helper objects of post transform.
Next: Add instChecks as well.
|