| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Check that children of a node have non-overlapping positions and that positions
of successive children are monotonically increasing.
This holds currently except for 3 exceptions:
- Trees coming from Java as the Java parser also does desugarings which copy trees.
- Functions coming from wildcard expressions
- Interpolated strings
We'll see whether we can do something about the latter two.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In particular:
- get rid of envelope, it's too complicated and hides too many errors
- check that everywhere in parsed trees the position range of a parent
node contains the position ranges of its children.
- check that all non-empty trees coming from parser have positions.
The commit contains lots of fixes to make these checks pass.
In particular, it changes the scheme how definitions are positioned.
Previously the position of a definition was the token range of the
name defined by it. That does obviously not work with the parent/children
invariant. Now, the position is the whole definition range, with the
point at the defined name (care is taken to not count backticks).
Namer is changed to still use the token range of defined name as the
position of the symbol.
|
|
|
|
| |
And remove the not used Printer#echo
|
| |
|
|
|
|
|
|
|
|
|
|
| |
There's a trap otherwise that, when in a class inheriting
from Context (and with it Reporting) a call to println will
go to this.println and therefore might not print at all, if
the current context buffers messages. I lost a lot of time
on this on several occasions when I scratched my head why
a simple debug println would not show. Better avoid this in
the future for myself and others.
|
| |
|
|\
| |
| | |
Fix #877
|
| |
| |
| |
| | |
Needed to make builds deterministic.
|
|/
|
|
|
|
|
| |
`parser` is strictly speaking not a phase, but it makes sense
to allow parsed trees being printed. Before this was only possible
if the `typr` printer was enabled, but this was cumbersome, non-intuitive,
and did too much.
|
|\
| |
| | |
Partest output redirection over context.reporter
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
I scanned the main sources with IntellIJ's spell checker and
corrected what showed up.
|
|
|
|
|
|
| |
Java compilation units should not be retained after typer,
as no code will be generated for them. All we need from
them are their symbols.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Previously, stackoverflows led to infinite loops because the catch
immediately threw another stack overflow. Anyway, one should never
catch Throwable.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ported from scalac 2.11.x branch SHA 9753f23f9362b25a9f481b11dd8d51187187882a
This is mostly a direct port, with few significant dotty-specific
changes needed. The two more significant changes are:
In dotty, the first constructor of a class is pulled out separately from
the other stats in the Template.
The keyword detection code (buildKeywordArray) was moved into Tokens so
that it can more cleanly be shared by the Scala and Java scanners.
|
|
|
|
| |
Allows to alter number of compilation units.
|
|
|
|
|
| |
Most transformations are subclasses of phase. Having a generic name
like `name` in scope everywhere is therefore very risky.
|
|
|
|
| |
And avoid name clashes
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Objective: Avoid cycles by detecting all cases where
A <: B and B <: A
and removing those cases by unifuing A and B.
Cycles need to be avoided because they lead to deep subtype recursions.
|
| |
|
|
|