| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- compileMixed failed because there was a cycle between immutable.Seq (compiled) and
parallel.ParSeq (loaded from classfile). Inspection of the completion log (turn completions
Printer on) and the stack trace showed that there's nothing we can do here. The old hk scheme
did not go into the cycle because it did not force an unrelated type. I believe with enough
tweaking we would also hva egotten a cycle in the old hk scheme.
The test is "fixed" by adding parallel.ParSeq to the files to compile.
- Disable named parameter tests
Those tests do not work yet with the revised hk scheme.
Before trying to fix this, we should first decide what parts of
named parameters should be kept.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We would like to change from a scheme where eta-expansion was
prototype driven to one where unapplied parameterized types are always
eta expanded. The reason is that we might miss some eta expansions due
to cyclic references.
run/colltest4
is an exmaple. Here, we missed an eta expansion in the type of Iterator.
The class definition is:
trait Iterable[+A] extends IterableOnce[A] with FromIterable[Iterable] {
We'd expect that the second parent would expand to
FromIterable[[X0] -> Iterable[X0]]
But we miss the expansion because at the time we complete Iterable we have not
completed FromIterable yet. In fact this happens in both the old and the new hk scheme.
But in the old scheme we did not notice the error whereas in the new scheme we
get an error in PostTyper that the type Iterable does not conform to its bound
`[X0] -> Iterable[X0]`.
With this commit, we change the scheme, so that eta-expansion depends on the
type parameters of a type itself, instead of the expected type.
We should investigate whether we can do a similar change for Scala2 classloading.
Check kinds of type parameters
Also, do not allow a hk type if the bound is a * type.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new one only reduces straight applications of type lambdas with
definite arguments. It is called very early on appliedTo, and derivedRefinedType.
The old one, now renamed to normalizeHkApply also handles wildcard arguments
and can garbage collect general unneeded hk-refinements. It is called later, at various
places.
TODO: See what functionality of normalizeHkApply should go into betaReduce instead.
Maybe we can even drop normalizeHkApply? However: need to be careful to maintain aliases
for hk type inference.
|
|
|
|
|
| |
With this change, ski compiles (but with more errors than before).
Without it, it goes into various infinite recursions.
|
|
|
|
|
|
|
| |
Previously they were all lifted into a match with the came cases.
Now the first cases are handled directly by by the catch. If one
of the cases can not be handled the old scheme is applied to to it
and all subsequent cases.
|
| |
|
| |
|
|
|
|
|
| |
Previously we returned an empty Reporter with no errors so partest
reported the test as a success.
|
|
|
|
|
|
|
| |
The tests `i1059.scala` and `t3480.scala` are failing due to a bug
in pattern matcher that evaluates the `x` in `List(x: _*)` incorrectly.
Concerned issue: #1276
|
|
|
|
|
|
|
|
|
| |
To make tests pass, this required a looser specification of
`assumedCanEquals`, so that an abstract type T can be compared to
arbitrary values, as long as its upper bound can be compared. E.g.
T == null
T == "abc"
|
| |
|
|
|
|
| |
(and add it to commit set).
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Also, check that pattern matching against idents/selects/literals makes
sense.
The hooks perform an implicit search for an instance of `Eq[L, R]`, where
`L`, `R` are the argument types. So far this always succeeeds because Eq.eqAny
matches all such types. A separate commit will check the returned
search term for validity.
|
| |
|
|
|
|
| |
Real test is in neg/customargs
|
|
|
|
|
| |
Used to throw an uncaught merge error in checkAllOverrides
when compiling i1240c.scala.
|
| |
|
|
|
|
|
|
|
|
| |
When finding two symbols in the same class that have the same signature
as seen from some prefix, issue a merge error.
This is simpler and more robust than the alternative of producing an overloaded
denotation and dealing with it afterwards.
|
| |
|
| |
|
|\ |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When an implicit argument is not found, we should in any case
assume the result type of the implicit method as the type of
the tree (after reporting an error, of course). If we don't
do that, we get implicit errors on weird positions when we try
to find an implicit argument for the same tree again. This
caused a spurious error in subtyping.scala, and also caused
an additional error at the end of EqualityStrawman1.scala.
|
|/
|
|
|
|
|
| |
This test shows how we can make equality non-universal in Scala. It also
exhibited the two bugs fixed in the previous two commits.
Also related: SI-9763.
|
|\
| |
| | |
Improvements to cyclic checking, avoidance, named parameters
|
| |
| |
| |
| |
| |
| | |
Now verifies that the named type parameters of an overriding
type or class are the same as the named type parameters of
an overridden type.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If the method that recurses over a different type arguments,
if this method is specialised, it would lead to method not
being tail-rec anymore.
Eg:
def foo[@specialized A, @specialized B]: Unit = foo[B, A]
|
| |
| |
| |
| | |
These files were supposed to be remove, their content are now in variances.scala
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The standard syntax in Dotty now is `xs : _*`. In Scala2 mode,
following code should be valid:
list match {
case List(_, _, _, _ @ _*) => 0
case List(_, _, _*) => 1
case List(_, _: _*) => 2
case Nil => 3
}
|
|\
| |
| | |
Add/collection strawman
|
| |
| |
| |
| |
| | |
It worked more or less by accident before. Now it's more complicated,
but we also have tests.
|
| |
| |
| |
| | |
Some random neg tests from previous experiments.
|
|/
|
|
|
|
|
| |
There was a mssing condition which meant Tyepr thought it was
at the outermost scope where but was mistaken.
Fixes #1145
|
| |
|
| |
|
|\
| |
| | |
Special case pattern matching against abstract types with class tags
|
| | |
|
|\ \
| |/
|/| |
Value classes: add support for private[this] parameter
|
| | |
|
|\ \
| | |
| | | |
Fix #997
|
| | | |
|
| | |
| | |
| | |
| | | |
Also: include a test that private aliases are transparent.
|
| | |
| | |
| | |
| | | |
First version. Fixes #997.
|
| |/
| |
| |
| | |
Previously, some definitions were too public, others too private.
|