| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| | |
Fix/overriding
|
| |
| |
| |
| |
| | |
Somehow this was lost in porting (or was this done somewhere else
in scalac?).
|
| |
| |
| |
| |
| |
| |
| |
| | |
OverridingPairs had several bugs which caused pairs to be lost, which caused
missing overrides checks. Fixing OverridingPairs revealed several test failures
(and a problem in Synthetics generation which was fixed in the last commit).
Tests that became negative are all moved into neg/overrides.scala, and the
original versions in pos were fixed.
|
|/
|
|
|
|
|
| |
One test (t2613) required lifting a hard recursion limit in findMember
(used for debug only, will be removed in the future). The same test
also requires -Yno-deep-subtypes to be reset, so it's in pos_special
instead of pos.
|
| |
|
|\
| |
| | |
Transform/mixin
|
| | |
|
| |
| |
| |
| |
| | |
The fix to Types in 9bb35512 (Retract of optimization in computeDenot)
allowed the two tests to compile "twice" again.
|
| |
| |
| |
| |
| |
| |
| | |
Split into two phases, ResolveSuper before Erasure and Mixin after. Likewise GettersSetters
is split into Getters and Memoize.
All tests pass, except two tests fail when compiled twice. Will investigate next why.
|
| |
| |
| |
| |
| | |
Now also handles all supercalls. Seems to do the right thing on pos/traits.scala.
But does not pass most tests because the sym transformer forces too many things.
|
|\|
| |
| | |
Transform/private to static
|
| |
| |
| |
| |
| |
| |
| |
| | |
Cleans up after LambdaLift and Flatten. RestoreScopes exhibited a problem (double definition)
when compiling Unpickler. The root of the problem was in Applications.scala. The effect was
that arguments woulkd be lifted out, but then the argument expression would be used anyway. That caused
a closure to be present twice which caused the double def error much later. -Ycheck did not catch it because
the two closure expressions were in non-overlapping scopes.
|
| | |
|
|/
|
|
| |
This fixes #193.
|
|\
| |
| | |
Fix subtyping of types without symbols
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
By-name functions like `(=> T) => T` were not treated correctly before.
Witness the disabled `-Ycheck:gettersSetters` for transform/TreeCheckers
in thge test suite. This commit changes the scheme how => T types are treated
and fixes the problems with by-name functions.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The original problem was that in an expression
f(x = bar(y = z))
only the outer named arg was eliminated by FirstTransform.
The first error was that the postcondition in FirstTransform did not get to the named arg, because
it got called from the overrdden typed method in TreeChecker, yet function arguments were evaluated
with typedUnadapted.
action: change Retyper and TreeChecker to override typedUndapped instead of typed.
This flushed out the second error: transformOther in FirstTransform needs to recursively transform the argument
of a NamedArg, because the framework itself does not handle NamedArg nodes.
Now, all tests pass except that TreeChecker itself fails -Ycheck:gettersSetters due to a problem
with handling by-name function types. This should be fixed in a separate PR.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Only exception: dotc/transform. This seems to be for two reasons:
1) The call-by-name functions used in Decorator#foldRightBN cannot be translated correctly
at their use points.
2) An anonymous function in Constructors are not correctly lifted.
2) could be related to missing/duplicated symbols in pattern matcher. I'll follow up with a commit
that points these out.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
And bring back two tests for typing of patterns
|
| |
| |
| |
| |
| | |
We better make this configurable. Because sometimes we want to compile only the files
in the immediate directory.
|
| | |
|
|\ \
| |/
|/| |
Pattern matcher
|
| | |
|
| |
| |
| |
| | |
dotc_core_transform directory is empty. Files where moved while restructuring erasure.
|
| | |
|
| |
| |
| |
| |
| |
| | |
Like other synthetic methods, productArity will not be generated
if an explicit definition is given. Used to be generated unconditionally
in desugaring.
|
| |
| |
| |
| |
| |
| | |
Move flag that throws exception on deep subtyping stacks from Config varianble to setting.
Disable setting for core-pickling which had a deep subtype failure after pattern matcher
was integrated. Todo: Figure out why the subtype stack got so deep.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The problem is running changeOwner(from, to) where
- from is a ValDef or a Label
- an embedded definition has as owner not `from` but some
owner of `from`.
We allow such denomrlaized owners and the pattern matcher generates
them. This patch makes changeOwner take these situations into account.
|
| |
| |
| |
| | |
@odersky there are some tests disabled, which failed due to other phases being able to transform more code.
|
| |
| |
| |
| | |
testOnly dotc.tests
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
GADT bound resetting may only be applied when comparing
<pattern type> <: <expected type>, not when comparing the
other way around.
The fix revealed an error in a test case (t1048) which looks like a real error.
Therefore the test got moved to neg.
Conflicts:
src/dotty/tools/dotc/typer/Applications.scala
test/dotc/tests.scala
tests/disabled/t1048.scala
|
| |
| |
| |
| |
| | |
Except t1048 which infers incorrect type in typer, patmat creates a tree that computes a more precise one that fails to typecheck
Disabling erasure due to dozens of "Type BLA is illegal after erasure" errors.
|
| |
| |
| |
| | |
Now patmat passes tests but erasure fails.
|
| |
| |
| |
| | |
Breaks out boxing functionality of captured vars from lambda lift.
|
| |
| |
| |
| | |
... by reverting a premature optimization in Erasure.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Partial revert of 08c6eaca "this type is a term ref to the source module". The problem with
doing this is that it introduces spurious outer references. An inner module that contains
self referenves always needs the directly enclosing class. The revert avoids this dependency
by making ThisTypes always point to TypeRefs.
Several other changes were necessary to make the builds pass: TypeRefs had to get prefixes after
erasure so that they can be reloaded. Symbols of such typerefs had to be retrieved without forcing
a denotation.
One test (blockescapes.scala) fails and is moved to pending, awaiting further resolution.
Also two other new tests in pending which currently fail (and have failed before).
|
| |
| |
| |
| |
| |
| |
| |
| | |
The new phase replaces attachOuter. It creates outer accessors where needed
but does not yet define outer parameters or pass outer arguments.
It should run before pattern matcher, so that pattern matcher can access the
outer fields of scrutinees.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Makes erasure pass the test suite.
Erasure is not yet turned turned on by default, because TestNonCyclic fails
with a stale symbol error. The problem is that This types are coupled to Symbols
and therefore don't reload. This is a problem is This types refer to static symbols
that get recompiled. We either have to drop using This types for static references,
or redefine thme so that can be reloaded.
|
| |
| |
| |
| |
| | |
Arguments to this(...) calls need a special contet,
similar to - but different from - the supercall context.
|
| |
| |
| |
| |
| | |
This should set the foundation to turn debug erasure so that it can be
turned on by default
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
New phase ElimByName elimintaes by-name parameters. All other
occurrences of parameterless methods and ExprTypes are eliminated
in erasure.
The reason for the split like this is that it is very hard for
Nullarify to determine when to insert ()'s. The logic for this
is fragile because we need to look at previous denotations which might
not exist (before splitter) or might result from a merge
between parameterless and nullary methods. In Erasure
the same is much simpler to achieve.
|
| |
| |
| |
| |
| |
| |
| | |
This required a change in Ycheck where we now only test that the new tree has a subtype of the old
one. Previously the requirement was "same type" but this caused "sigs.scala" to fail because
a new tree had a constant Int type where the old tree had just Int as the type. It's hard to guard
against these narrowings and they look harmless.
|
| |
| |
| |
| | |
RefChecks is now enabled. Some of the tests had to be fixed to be refchecks-correct.
|
| |
| |
| |
| |
| | |
New phase for Synthetic Method generation. Scala 2.x did it in Typer, but
it's cleaner to do it in a separate phase.
|