| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Fix #756 super accessors
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Fix repeated
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
refOfDef is used in desugaring case classes, specifically the definition of an apply method.
Here it is necessary to pass a vararg argument (x: _*) if the case class parameter is repeated.
This functionality is now added to `refOfDef`. I verified that the other uses of `refOfDef` are
compatible with this change.
Fixes #768.
|
| | |
| | |
| | |
| | |
| | | |
Introduce a new non-terminal "SimpleLiteral". Only SimpleLiterals can be
types.
|
| | |
| | |
| | |
| | |
| | | |
Tested are now other numeric values, strings, booleans, which are
all legal singleton types.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Null and 'sym are not legal as singleton types because the underlying
values are not stable. They are rejected now outright instead of issuing
a cryptic "X is not stable" error message.
|
| | |
| | |
| | |
| | | |
It's decided that constant types and purity are independent.
|
|/ /
| |
| |
| |
| |
| | |
As the comment in pos/singletons.scala says, we currently
test only constant propagation during typer. We should also have a
test that literalize produces the literals in the right places.
|
|\ \
| | |
| | | |
Mixin: class defined abstract members take precedence over interface defined.
|
| |/ |
|
|/ |
|
|\
| |
| |
| |
| | |
dotty-staging/fix-liftedTry-capturedVars-interaction
Fix lift try and captured vars interaction
|
| |
| |
| |
| |
| | |
Checks the hypothesis that lifting a try may safely move expressions
into a ValDef owned by a new temp var.
|
| |
| |
| |
| |
| |
| | |
CapturedVars introduced an assignment that could cause a try to be
executed with a non-empty stack, even after LiftTry had already run.
We now avoid this by introducing a temporary variable.
|
|\ \
| | |
| | | |
Fixes to scala2 Mixin
|
| |/ |
|
|/ |
|
|
|
|
| |
TermRefs do not have a classSymbol.
|
|
|
|
| |
This reverts commit a43d39ad719978fbb36663f336c1c7cd2c4da1e0.
|
|
|
|
|
| |
Phase lifts tries that would be illegal because they execute on non-empty
expression stacks.
|
|
|
|
| |
Non-local returns are now implemented.
|
|\
| |
| | |
Ycheck that methods defined in ClassInfo exist in tree.
|
| |
| |
| |
| | |
Mixi was not calling transformFollowing on generated setters.
|
| | |
|
| |
| |
| |
| |
| | |
Making a correct fix could take some time,
and I want to find other issues before I start working on this one.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Avoid crashes on double definitions
|
| | | |
|
|\ \ \
| | | |
| | | | |
Implement emission of annotations in GenBCode.
|
| | |/
| |/|
| | |
| | | |
Fixes #688
|
|\ \ \
| | | |
| | | | |
Move the inlining of value class methods before Erasure
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
VCInline is split into two phases:
- VCInlineMethods (before Erasure) replaces value class method calls
by calls to extension methods
- VCElideAllocations (after Erasure) handles == and optimizing the
unboxing of a boxed value class, as VCInline did before.
This should not affect anything currently, but in the future we will have
phases before Erasure that mangle names (like TypeSpecializer, see #630),
being able to put these phases after VCInlineMethods means that
VCInlineMethods does not need to know anything about how these phases
mangle names, this reduces the coupling between phases. The trade-off is
that VCInlineMethods needs to deal with type parameters and multiple
parameter lists whereas VCInline didn't.
|
|\ \ \
| | | |
| | | | |
Don't add lower bounds of abstract types to the implicit scope
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
As the spec[1] says:
"The parts of a type T are [...] if T is an abstract type, the parts of
its upper bound;"
[1]: http://www.scala-lang.org/files/archive/spec/2.11/07-implicits.html#implicit-parameters
|
|/ /
| |
| |
| |
| | |
The productPrefix of a case class should be the name of the class itself
to match Scala 2.
|
| |
| |
| |
| |
| |
| |
| |
| | |
What is checked: A self type T is a subtype of all
selftypes of classes refernced by T. That is, a self type
has to subsume all self types of its required type. Ot,
otherwise said, requirements must be closed; you cannot
discover new ones in following them.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
A TypeRef can have be unresolved, either because it refers to something that's missing
from the classpath or because of transitive self type references. Instead of crashing
in sigName, we now report the error.
Achieved by defining a new exception type, MissingType, which derives from TypeError.
This catches t7933.scala, now integrated in the neg/selfreq.scala. The problem there was
a reference to AbsSettings, which was not a member of StandardScalaSettings.this,
but was a member of the required type of AbsSettings, which itself appeared in the
required type of StandardScalaSettings. We will outlaw in the next commit such transitive
required references.
Also collapsed TypeError and FatalTypeError. It was a misnomer anyway. Fatal were those
type errors that were caught and reported!
Open: Where else we should check for unresolved NamedTypes.
|
|\ \
| |/
|/| |
Fix/dependent methods
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Necessary to make implicit resolution of type-level peano numbers work.
The current commit makes takes the inimal steps to make this happen. We
could also consider sharpening using followAlias every type we constrain
a result, or every time we adapt a type.
|
| |
| |
| |
| | |
Now handles included test if toplevel implicit is given, but not yet without.
|
| |
| |
| |
| | |
This confirms that SI-6359 does not apply to Dotty.
|
|\ \
| | |
| | | |
Avoid crasher when first token of a program is in error
|
| | |
| | |
| | |
| | | |
Seems partest adds code to the sources so that line numbers are not the same.
|