| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
If a symbol becomes a class field, references to it need to be selections, or
else we get a "bad type" assertion violation in TreeChecker.
|
|
|
|
|
|
| |
... so that they do not spill over between compilation units. It would be better to wipe the maps after
processing a compilation unit, but right now we do not have a hook for that. A better solution should
be possible once we replace init by "prepareUnit/transformUnit".
|
|
|
|
| |
All tests pass, but good to have the condition in there.
|
|
|
|
|
|
| |
- supertype components needs to be recursively erased
Without this fix, some files do not pass -Ycheck:lambdaLift
|
|
|
|
|
| |
Nested methods cannot refer to labels in theior environment. Needs a fix in TailCalls.
Moved failing test to pending.
|
| |
|
| |
|
|
|
|
| |
Several fixes to LambdaLift. The test suite now succeeds with LambdaLift enabled.
|
|
|
|
|
|
|
| |
The skip logic in enclosing class worked only when the original symbol was labelled
inSuperCall. The patch makes it work also for symbols that are in turn owned by an
inSuperCall symbol. Also it treats JavaStatic terms as also not being enclosed by
the lexically enclosing class.
|
|
|
|
|
| |
typeParams and outerAccessor both potentially scan all declarations of a class.
The fixes make sure this is never done for packages.
|
|
|
|
| |
Statement sequences need to be flattened after processing, not before.
|
|
|
|
|
|
| |
Static has two meanings: In the Java sense, and in the Scala sense, where it means
a member of a package or static module. The change makes it clear that the flag means
Static in the Java sense.
|
|
|
|
| |
... by forwarding to Object. Without this, LambdaLift fails for core/Contexts.scala.
|
|
|
|
|
|
|
| |
Now handles the case where a class symbol itself is not changed by the map,
but one of its declarations is. In this case we need to back out, and create
new symbols for the class and all other symbols that are defined in the same scope as
the class.
|
|
|
|
|
|
|
|
| |
... and these mappings have to be part of the applied substitutions.
Without the patch, the postCondition of FirstTransform fails for TreeInfo.scala and others,
because it selects symbols which are not defined in the mapped class.
Unrelated bugfix: JavaArray derives from Object.
|
|
|
|
|
|
|
|
| |
Package object members are seen as members of the enclosing package during
typer. The normalization inserts the missing .package reference to such members.
It is necessary to satisfy a new postcondition of FirstTransform: In a selection `x.m`,
the type of `x` must derive from the owner of `m`.
|
|
|
|
| |
Flushed out a caching bug in Scopes.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The patch disables hoisting of classes local to a block into the
result type of the block.
Instead, we widen the result type of the block to one which reflects
all refinements made to the parents type of the local class.
Test cases in avoid.scala, t1569.scala.
The original t1569.scala no longer works. Why is explained in neg/t1569-failedAvoid.scala
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's often useful to print a value as it is returned. This method
avoids the temporary variable to hold the vaue before it is printed
and then return. I.e.
printer.echo(msg, expr)
instead of
val x = expr
printer.println(msg + x)
x
|
|\
| |
| | |
constructors & getters-setters
|
| |
| |
| |
| | |
to get a working baseline build
|
| |
| |
| |
| |
| |
| | |
After erasure, asInstanceworks only bedtween reference types, so erasure
is not allowed to insert asInstanceOfs between numeric types. Previously
this made t1260 fail even if LambdaLift is disabled.
|
| | |
|
| |
| |
| |
| |
| |
| | |
Typer creates a tree that given current decoding scheme means
case a @ (Assign(Ident(id), rhs) : tpt)
Which isn't valid scala.
|
| |
| |
| |
| |
| |
| |
| | |
Substitution was creating more problems than solving.
Instead the symbols in tree aren't rewriten anymore,
and pattern matcher collects Rebindings and generates ValDefs
for them just before the guard & body of the generated case.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
given a pattern
object b
x match {
case y @ b => <body>
}
y inside the <body> `y` should have type b.type.
Inherited from scalac EqualityTestTreeMaker would reset type of it
in order to achive this.
Dotty instead needs to know this in advance.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
In scalac SubstOnlyTreeMakers were implemented using substitution,
and didn't actually introduce new trees.
Thus there was an optimization to remove them while generating code.
This optimization led to #190. It is now removed.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When using RefinedPrinter we now have a choice whether when
printing a definition tree such as
def foo(x: T): U
we print the parameter and result type info found in the tree or in the symbol.
Previously, we printed the sym info when after typer and the tree info before.
This turns out to be too inflexble. With the patch, we print the sym info if
option -Yprint-syms is set, and the tree info otherwise.
Also, align -Yno-deep-subtypes from camelCase to standard hyphenated option notation.
Tweak where unique ids are printed.
|
| | |
|
| |
| |
| |
| | |
Should fix #188
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Tests now always include erasure (before quite a few tests failed when erasure
was enableed). By contrast lazy vals creates problems with erasure, disabled
for now.
Some other small polishings on integration of pattern matcher with rest of dotc.
Deep recompilation of tools still fails, currently disabled.
|
| |
| |
| |
| | |
They are in SymUtils
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Previously caused an illegal backwards timetravel in bringForward when compiling
all files in tools together twice.
|
| |
| |
| |
| | |
Avoids a stale symbol error when compiling all files in tools together.
|
| |
| |
| |
| | |
... because Any is not an erasedType (this is now checked)
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
1) strip TypeVars where necessary before widening
2) allow the combination of widening and dealiasing, in any order.
|
| |
| |
| |
| | |
And bring back two tests for typing of patterns
|
| |
| |
| |
| | |
Was lost in merge chaos between pattern macther and rest
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
Similar to Erasure, we do not check conformance wrt <:< to a FunProto.
Nothing is lost, because we typecheck the arguments and result anyway.
And this led to failing tests after GettersSetters was added.
|
| |
| |
| |
| |
| |
| |
| | |
1) Avoids unneccessary second adapt.
2) Avoids error when used in TreeChecking when we try to compare
types in previous tree and new tree - if we used `typed`, the
previous tree would not have a type!
|
| | |
|