| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Transform/private to static
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Make private methods in traits static, so that we do not need
to give a default for them.
|
| |
| |
| |
| | |
Threw away list of constructed statements.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
To be combinable with follow-up mini-phases the lift operation needs to handle Thickets specially.
This commit factors out the behavior from LambdaLift, so that Flatten can do the same thing.
|
| | |
|
| |
| |
| |
| | |
Some changes needed so that Flatten can run after LambdaLift
|
|\ \
| |/
|/| |
Detect cycles involving types bounded by singleton types
|
|/
|
|
| |
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.
|
|\ \ \
| | | |
| | | | |
Restructure Try node.
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
Instead of desugaring in parser desugaring is now done during desugaring.
|
| | | |
| | | |
| | | |
| | | | |
It's not used anymore as superseded by previous commit.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Now Try node always has cases as handlers.
In case handler is an Ident of type Throwable => T
than it's desugared to a CaseDef during parsing.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
After erasure was always wrong(didn't include the type of handler).
Now it's able to use both Closures and desugared Math nodes.
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
It doesn't exist.
Also use symbol with 'ex' name as selector for exceptions
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
Box& unbox methods are defined in companion objects.
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
Simplifies a lot handling of Try blocks in patmat and in tailrec.
|
| | | | |
|
|/ / / |
|
|\| |
| | |
| | | |
Transform/lambdalift
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | | |
tests.
|
| | |
| | |
| | |
| | | |
known to succeed.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
TreeChecker now tests that a symbol does not have two definitions that define it,
and that every reference to a symbol owner by a term is in the scope of a definition
of that symbol.
Both tests fail on several files for pattern matcher.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | | |
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.
|
| | | |
|
| | | |
|