| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Better comments and refactorings that move some things around
so that less modules depend on Inliner.
|
|
|
|
|
|
|
|
|
|
|
|
| |
We got an error when we tried t opur @inline annotations
on function parameter types. It turned out that there were
lots of places where annotations on a type would break a test
in the compiler.
So we now drop annotations by default when dealiasing. We provide
dealiasKeepAnnots as an alternative that has the old behavior, i.e.
rewrap annotations after dealiasing. The only place where we found we
needed this was in the exhaustivity checker.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After inlining we got a Ycheck error of the form:
found : `this.asInstanceOf[SelfType].C`
expected: `this.C`
The fact that it was related inlining was coincidental I think.
We fix the problem by expanding to
this.asInstanceOf[SelfType & this.type].C
instead.
|
| |
|
|
|
|
|
|
|
|
| |
1. Better formatting in TreeChecker error message
2. Re-enable printing what stack of what was checked
when an error occurred. This was disabled in Retyper
because we did not do it for the Inliner typer.
Now we distinguish on phase instead.
|
|
|
|
| |
Also, do some refactorings and fix some bugs in Inliner.
|
|
|
|
|
|
|
|
|
|
|
| |
This required a major change in the way positions are handled, as the
previous scheme did not allow to read the positions of arbitrary subtrees
selectively.
Fortunately, it's altogether a major simplification.
Also, this fixed a bug in the previous scheme, where positions were
generated before compactification, resulting in addresses being wrong.
|
| |
|
|
|
|
|
|
|
|
|
| |
... to tag inlined calls. Perform typings and transformations
of inlined calls in a context that refers to the INlined node
in its InlinedCall property.
The idea is that we can use this to issue better error
positions. This remains to be implemented.
|
|
|
|
| |
To do this, factor out Key from Attachment into a new type, Property.Key.
|
|
|
|
|
| |
To be done: outer accessors
To be done: error positions
|
|
|
|
| |
Prefer to access directly via symbol.
|
| |
|
|
|
|
| |
Thicket has a vararg constructor, so this syntax is redundant.
|
|
|
|
|
|
| |
Roll its functionality into Select. Since we can always
tell whether a tree is a type or term there is no expressiveness
gained by having a separate tree node.
|
|
|
|
|
|
|
|
| |
Drop tree node class 'Pair'. It was used only in imports, where
it can easily be replaced by Thicket.
The envisaged use for generic pairs is almost sure better modelled
by a "Pair" class in Dotty's standard library.
|
|
|
|
|
|
|
|
|
| |
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
|
| |
| |
| |
| |
| |
| | |
Need to do time travel to find out whether members
were created as static symbols. After LambdaLift
and Flatten most symbols are static anyway.
|
|/
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
|\
| |
| | |
Fixes of GADTs and test recategorization.
|
| |
| |
| |
| |
| |
| |
| | |
Tree checker typed always dropped the expected type and replaced it by a wildcard.
This meant that type checking dor -Ycheck was much weaker than it should be.
A class of GADT problems is only diagnosed once the expected type is proberly
propagated.
|
|/ |
|
| |
|
|
|
|
|
|
|
|
| |
If a super trait is given as a type (i.e. no argument list), implicit args were
not passed. This is fixed now. Also, we now check for parameterized traits lacking
type arguments in Typer instead of in Mixin.
Fixes #1444.
|
|
|
|
|
|
| |
Roll `sm` and `i` into one interpolator (also called `i`)
Evolve `d` to `em` interpolator (for error messages)
New interpolator `ex` with more explanations, replaces disambiguation.
|
|\
| |
| | |
Fix #1442: add new phase, SelectStatic
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Blocks are not denoting trees(why aren't they?)
For now, I'm fixing this using a quick fix.
For future, it may make sense to discuss this on dotty meeting and
make blocks be a Denoting tree and return denotation of expo.
Another option is to move regularisation logic into tree transformers.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
GenBCode has an implicit assumption that I wasn't aware of:
GetStatic should not be emitted against a valid selector.
If it is, GenBCode messes up the stack by not pop-ing the selector.
Surprisingly, this transformation is perfumed in nsc by flatten.
|
|\ \
| |/
|/| |
Add arrays to collection strawman
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The closures generated by elimByName did not get the InSuperCall
flag set. This caused problems in lambda lift which led to a
verify error for the new version CollectionStrawMan6. That version
replaces explicit function parameters in class LazyList by
by-name parameters.
Also: Clarify logic for liftLocals in LambdaLift (liftLocals caused the immediate
problem but was in the end not to blame).
|
|\ \
| | |
| | | |
Fix #1269: Typing and pattern matching of nested subclasses
|
| |/
| |
| |
| |
| | |
Previous test did not reflect deeper paths for outer references. This caused
a -Ycheck:patMat failure for i1269.scala.
|
|\ \
| | |
| | | |
Fix #1263: Suppress super initializer call for val parameters of traits.
|
| |/
| |
| |
| |
| |
| |
| | |
Val-parameters of traits don't have an initializer, as other vals do. So
we cannot call the initializer in an initialization sequence of a subclass.
Fixes #1263.
|
|\ \
| | |
| | | |
partest: Enable separate compilation
|
| | |
| | |
| | |
| | | |
Java's naming convention is different from Scala's.
|
| |/
| |
| |
| |
| | |
This is necessary to unbox the value class when accessing it from
separate compilation units
|
|/ |
|
|\
| |
| | |
Direct representation of higher-kinded types
|
| |
| |
| |
| |
| | |
Allows us to drop also the involved knownHK method. Lots of other
cleanups.
|