| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
See https://github.com/lampepfl/dotty/pull/624#issuecomment-107064519
for a lengthy explanation.
|
| |
|
| |
|
|
|
|
|
|
| |
class is also the top-level class"
This reverts commit 6898d2c296326779d373ef0e0b84e4451550120a.
|
|\
| |
| | |
Add a test for supercalls in traits.
|
| |
| |
| |
| | |
Also added non-unit fields and a class that directly implements two traits with the same fields.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Also mark the forwarder as Stable otherwise we get a RefChecks error.
This fixes #608.
Note that we do less parameter forwarding than scalac. See for example D
and Y in tests/run/paramForwarding.scala which don't get their own local
fields in scalac but do in dotty.
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
Harmonization is Dotty's alternative to Scala 2's notion of weak conformance. It is less powerful but also
less entangled with the core type system. The idea is that in some specific contexts trees that
all have primitive numeric types will be converted as necessary so that they all have the same numeric type.
These tree sets are:
- the two branches of an if
- the alternatives of a match
- the body together with the catch blocks of a try
- the arguments of a vararg parameter
Examples are in the test file, harmonize.scala.
|
|
|
|
| |
Some of them were moved from disabled after verifiying that they compile now.
|
| |
|
| |
|
|
|
|
|
|
| |
Both tests fail with the same error: "Cannot create object because
protected[this] newBuilder is not implemented". Not clear why partests
claim to succeed here.
|
|\
| |
| | |
Improvements to higher-kinded types
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Adds IterableSelfRec.scala which caused lockup of the compiler.
After a lot of work the problem was determined to be polyomial or
exponential behavior of the compiler when executing findMember
on refined types that contain several bindings where the
resutling & causes a recursive invokation of findMember with
the same name. We do have a stop for this now, but if the
stop comes too late the runtime will grow very fast.
Problem addressed by kiccking in earlier with the stopping logic.
|
| |
| |
| |
| | |
The test case that caused all previous commits in this branch.
|
| |
| |
| |
| | |
Did not handle this case before.
|
| |
| |
| |
| |
| | |
This mimics scalac's behavior (but not the official syntax; in fact the
official syntax seems to be ambiguous.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As the comment in the code says:
"In general, a bridge is needed when the signature of the closure method after
Erasure contains an ErasedValueType but the corresponding type in the functional
interface is not an ErasedValueType."
So we need to check if _at least one_ of the type needs to be adapted,
not if _all of them_ need to, the use of "forall" was an error.
|
| | |
|
| | |
|
| |
| |
| |
| | |
Note that some of them may pass due to several bugs that interfere.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this commit, the following code:
trait Hello {
println("Hello")
val x: Int = 1
println("World")
}
Became:
<trait> trait Hello extends Object {
def <init>(): Hello = {
{
()
}
this
}
<accessor> def x(): Int
protected def initial$x(): Int = {
println("Hello")
1
}
}
Notice that the initialization statements after the last getter were
missing, this is now fixed:
<trait> trait Hello extends Object {
def <init>(): Hello = {
{
println("World")
()
}
this
}
<accessor> def x(): Int
protected def initial$x(): Int = {
println("Hello")
1
}
}
|
|
|
|
| |
also the top-level class
|
| |
|
|
|
|
|
| |
Erasure#isUnbox was incorrect: the unbox methods are defined on the
value classes, not the boxed classes.
|
|
|
|
|
|
|
|
|
|
| |
object as owner and be followed by type arguments:
reflect.classTag[T]
expands to
reflect.`package`.classTag[T]
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
Fix #547: Vararg overload
|
| |
| |
| |
| |
| | |
When comparing to types in isAsSpecific, onvert repeated parameters to their underlying type
only if both types are vararg methods. This mimics scalac behavior.
|
|\ \
| | |
| | | |
Make dotty compile backend.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We used to require that the result type of an extractor `get` is a product,
or else the type of the `get` itself would be taken as the result type of the
unapply. This is now relaxed so that we automatically select with _1, _2, ...
as soon as there are multiple argument patterns, and (1) the result type is not
a Seq, (2) the number of consecutive product conselectors matches the number
of arguments.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It seems wasteful to load the member classes even of classes that are not currently compiled.
It also makes us vulnerable to any misinterpretation of Java file formats. In th particular
case of #536, we parsed a class an anonymous Collection$1 which was referring to the type
parameter of its enclosing class, but was not diagnosed as an inner class of the enclosing class.
|
|\ \ \
| |_|/
|/| | |
Fix #540 - unbounded array test for wildcard array arguments
|
| |/
| |
| |
| |
| |
| | |
Arrays with wildcard arguments such as Array[_ <: Foo] where Foo is a
universal trait are now diagnosed as unbounded generic arrays and are
erased to Object.
|
|/
|
|
|
|
|
|
|
| |
We used to require that the result type of an extractor `get` is a product,
or else the type of the `get` itself would be taken as the result type of the
unapply. This is now relaxed so that we automatically select with _1, _2, ...
as soon as there are multiple argument patterns, and (1) the result type is not
a Seq, (2) the number of consecutive product conselectors matches the number
of arguments.
|
|\
| |
| | |
Fix #518 - compute denotations
|
| |
| |
| |
| | |
Tests #518.
|
|\ \
| | |
| | | |
Expand SAM closures to anonymous classes if needed
|
| | |
| | |
| | |
| | | |
The test included here fails in backend.
|