| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
| |
| |
| | |
I reiterate my suspicion that these tests are too specific. So far, all these test failures were spurious. They created work without giving a benefit.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
Most transformations are subclasses of phase. Having a generic name
like `name` in scope everywhere is therefore very risky.
|
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| | |
1) Add copiers with default arguments, to avoid boilerplate
2) All copiers are now curried wrt first argument (which is
the original tree).
We already make use of the new features in cpy.DefDef, but not yet elsewhere.
|
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| | |
TreeTransforms are no longer phases. This allows to generate
new transforms in prepare... methods without running into the
problem that thee new transforms are undefined as phases.
It also makes for a cleaner separation of concerns.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Now that F-bunded types are treated more robustly, we can check bounds for
non-emptyness during Typer.
This unvealed one wrong test (wonder how that passed scalac?), which got
moved to neg.
|
|/ |
|
|
|
|
|
|
|
| |
Variance checking is now run as part of type-checking.
Fixed tests that exhibited variance errors. Added tests where some classes of
variance errors should be detected.
|
|
|
|
| |
Hurray!
|
|
|
|
| |
Fixed typo in Splitter. Closes #148.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This acommit allows TailRec to run after ExtensionMethods. This is
due to the following changes:
1) Extension methods now "rewire" calls to other extension methods of the
same class, so that they go directly to other extension methods
instead of to the original method in the class.
2) Tailrec annotations get removed from original method and get
added to the extension method instead.
With this commit all tests can be re-enabled again.
|
|
|
|
|
|
|
|
|
| |
Fixed extension methods so that it now runs and passes the build.
Also enables ElimRepeated, which is a prerequistite for ExtensionMethods.
Exception: Tailrec is currently disabled, because it needs to run before
ExtensionMethods but it fails the -Ycheck test. Therefore the current tests
skip this phase.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
New phase for extension methods.
Also, split off some type handling functionality that can be used
elsewhere in new TypeUtils decorator. The idea is that TypeUtils should
contain methods on Type that make sense specifically for transformations.
That way, we can keep Types from growing. Might make sense to do similar
decorators for Denotations as well.
There's a bug fix in MacroTransform: Need to treat selfInfo varDels specially, since they have no symbol.
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) We now always generate companion objects for classes. This is done in
mini-phase "companions", which also assures that companion-modules appear
after companion-classes.
2) PostTyperTransformers is gone; the part which normalizes trees has been
rolled into TreeTransform and the part which reordered companion classes
and modules is now in Companions.
Note: Some tests were deisabled; should be re-enabled by Dmitry where needed.
|
|
|
|
|
| |
Rewrote SuperAccessors (more to be done; see comments), and
added stuff here and there to make it work smoother.
|
| |
|
|
|
|
|
| |
Switch to the new scheme where higher-kinded types (and also some polymorphic
type aliases) are represented as instances of Lambda traits.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
abstract type.
This is needed to make the encoding og higher-kinded types work. E.g.
Rep[Int]
would be represented as
Rep { type Arg$0 = Int } # Apply
where Apply is an abstract member of the base class Lambfa$I of Rep.
|
| |
|