| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
|
|\
| |
| | |
Small fixes
|
| | |
|
| |
| |
| |
| | |
becaus this is the limit imposed by Travis
|
| |
| |
| |
| | |
I still have 1.6 installed. So the two simple fixes are necessary to make my build pass for now.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There's a delicate balance about how much of a prototype should be passed down the
tree when typechecking. Passing little can cause ambiguity errors (both in overloading
and in implicit search). Passing too much can cause spurious errors because implicit conversions
"down the road" that apply to some tree continaing the result might not be considered.
Symptoms of the problems wree that we could not handle the tests included in this commit before.
The new scheme is as follows: we always keep all available information in a prototype, but hide nested
prototypes behined a `IgnoredProto` wall. These trees will not be considered for conformity checking.
When type checking hits an ambiguity, it tries again with a prototype that's one level deeper (has fewer
Ignore links) than the previous one. This continues until there are no more Ignore links to unwrap.
We also generalize the scheme for wrapping qualifiers of select nodes from realApply to all instances where
we compare against a FunProto.
Finally, there are some fixes that avoid assertion violations that were provoked by the new typechecking scheme.
|
| | |
|
|/
|
|
| |
Refactored reporters to increase clarity and to pave the way for having Diagnostics subclasses.
|
| |
|
|
|
|
| |
With the previous fixes, we can now compile dotc/transform without errors.
|
|
|
|
|
|
|
|
|
| |
defaultOptions is now an implicit parameter, which means it can be overridden
on a call-by-call basis.
Added -Ycheck:front to verify that typed trees typecheck again with same types.
The option is disabled for one of the structural tests.
|