| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Now reuse symbols from typer. Less substitutions -> better performance.
|
|
|
|
|
|
|
|
|
|
|
| |
Implementation of pattern
sel match {
x => <body>
}
used to replace references to x by references to sel in <body>.
This is not type correct and it also requires additional traversal of
body.
Now SubstOnlyTreeMaker generates a `x = sel` statement.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Can handle now vararg arguments in patterns.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Previous postcondition checking did not take into account that phases are
not flat - they consist in part of macro phases that contain miniphases.
In fact the whole set up in Run is dubiuos - we should eliminate the problem at the
root, as described in the TODO in run.
|
|
|
|
| |
@odersky there are some tests disabled, which failed due to other phases being able to transform more code.
|
|
|
|
|
|
|
|
|
|
|
|
| |
TypeVars can appear as keys in baseType caches. The problem is that
their base types depend on their instantiation, which is not always
know yet when the test is performed. So results of baseType on
type variables should never be cached.
Todo: check whether there are any other caching problems involving typevars.
Conflicts:
src/dotty/tools/dotc/core/SymDenotations.scala
|
| |
|
|
|
|
| |
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
|
|
|
|
| |
Indicating that pt is type of selector is this pattern match makes it easier to follow.
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
That doesn't mean that it works.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Some compilation errors fixed
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
With the new more systematic treatment of fresh symbols in TreeTypeMap, this
is no longer ncessary.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. They now keep track of changed constructors in templates, updating
the class scope as for other members.
2. Any changed members are now entered into the new class scope at exactly
the same position as the old one. That ensures that things like caseAccessors
still work.
3. ChangeOwners now is reflected in the prefixes of any named types.
4. Newly created classes now get their own ClassInfo type.
5. TreeTypeMaps always crete "fresh" symbols. Fresh symbols do not share
a NamedType reference with an existing reference to some other symbol.
This obviates b2e0e7b4, which will be reverted.
To make it work, the interface of TreeMap changed from an ownerMap function
to a substitution-like data structure working with two lists.
|
|
|
|
| |
Breaks out boxing functionality of captured vars from lambda lift.
|
|
|
|
|
| |
Treat clone like the other primitive array operations, ensure it
returns a JavaArray.
|
|
|
|
| |
Include a backtrace of nested calls on error.
|
|
|
|
|
|
| |
Otherwise would spuriously treat variables referenced
from while loops as captured, because their enclosing method
differs from current enclosing method.
|