| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Fix #1045
|
| |
| |
| |
| |
| |
| |
| |
| | |
The test checks that Scala collections perform within 10x of Java collections.
That's not something we need to test for dotty. And because of the heavily
parallel execution of the tests it does not always hold. This is the second
time in a a month that this particular test failed on jenkins. I think we lost
enough cycles on it.
|
| |
| |
| |
| |
| | |
See comment in Typer#approximateUnion for an explanation.
Fixes #1045.
|
| |
| |
| |
| |
| | |
This gives in general a supertype, that's OK for approximation.
See ee76fda for an explanation.
|
|\ \
| | |
| | | |
Fix #1065 erasedLub for arrays of primitives.
|
| |/ |
|
|\ \
| | |
| | | |
Handle "missing args" case when expected type is a singleton type.
|
| |/
| |
| |
| | |
Fixes #803.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When `wildApprox` encounters a PolyParam it approximates it by its
bounds in the current constraint set, but this is incorrect if
`TypevarsMissContext` is set, we might get the bounds of another use of
this `PolyType`. This is exactly what happened in i1044.scala where the
implicit view `refArrayOps` needs to be used twice with two different
type parameters.
The fix is to approximate a PolyParam by its original bounds in its
PolyType if `TypevarsMissContext` is set.
This fix was inspired by the approach of #1054.
|
|/
|
|
|
|
|
|
|
| |
It seems when unpickling nsc that some module classes come
without a source module. Survive this situation rather than
crashing. i859.scala is an example.
i859 compiles with the patch, but causes a deep subtype when unpickling.
Not sure whether scalac does the same.
|
| |
|
|\
| |
| | |
Fix #998
|
| |
| |
| |
| | |
Needed a fix in approximateUnion.
|
|\ \
| | |
| | | |
Fix #1037
|
| |/
| |
| |
| |
| | |
We verified that before the combination abstract/concrete for `x`
also led to AMEs. So we test it here explicitly, too.
|
|/
|
|
| |
Achieved by tweaking from where we get the parameter types of an eta-expansion.
|
| |
|
|
|
|
|
| |
New test that exhibited the problem is ski.scala. Previously
this did not fail with a bounds violation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When TypeVar#inst is empty but an instantiation exists in the typer
state, we should set ephemeral to true, because this instantiation will
be retracted if we throw away the current typer state.
This makes hkrange.scala pass, it compiled before but the type parameter
of `f` was inferred to be `Nothing` because of this bug, and this failed
Ycheck.
For anyone who wonders how caching bugs manifest themselves, here's what
happened in details in hkrange.scala:
1. In an ExploreTyperState we set `CC` to be `IndexedSeq` in the
constraint set
2. In that same typer state the TypeRef `CC[Int]` (it's a TypeRef
because `CC` is a type lambda) gets the denotation `IndexedSeq[Int]`,
which is correct, but the denotation is cached since `ephemeral` is
false, which is wrong.
3. Later, we retract the ExplorerTyperState, so `CC` is uninstantiated
again and unconstrained.
4. Then we do the subtyping check `CC[Int] <:< IndexedSeq[Int]`, because
the denotation of `CC[Int]` was cached, this returns true, but `CC` stays
unconstrained.
5. This means that when we instantiate `CC`, we get `Nothing`
After this fix, the TypeRef denotation is no longer cached, so when we
do `CC[Int] <:< IndexedSeq[Int]`, `CC` gets constrained as expected.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All of our recent memory-related tests failures since
https://github.com/lampepfl/dotty/pull/1030 was merged seem to be caused
by t7880.scala. It tries to intentionally trigger an OutOfMemoryError,
however since we don't pass -Xmx to our run tests it's possible that
this we fill up the memory of our host before we reach the maximum heap
size of the JVM.
Ideally, we would specify a -Xmx for run tests (scalac uses 1 GB),
unfortunately in the version of partest we use this is tricky because we
need to set the system property "partest.java_opts". If we upgrade our
partest to the latest release, we can instead specify it by setting the
argument `javaOpts` of the constructor of `SuiteRunner`, see
https://github.com/scala/scala-partest/commit/7c4659e1f88b410109ad3c4e7f66ae7070c6e985
|
|
|
|
|
|
|
|
|
| |
Type params should be computed before computing the whole info of
a type. Without the patch we get a cyclic reference in the compileMixed
test.
Note that compileIndexedSeq does not pass with this commit (it passed
before), this is fixed in the next commit.
|
|
|
|
|
|
|
| |
Need to also look info refined types.
Need to handle case where we hit a NoCompleter again.
Fixes #974 and makes MutableSortedSetFactory in stdlib compile.
|
|\
| |
| | |
Ycheck that scala.Array is erazed to either Object or JavaArrayType.
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Fix #1009: Do not forget to skolemize some types
|
| | | |
|
|\ \ \
| |/ /
|/| | |
More tests
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In a situation like
List <: [X] -> <: GenTraversable[X]
We have to ask whether the rhs contains the instantiated lhs,
not whether it is a supertype.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Symbols can appear in patterns, so inserting an `apply` is wrong.
|
| | | |
|
| | |
| | |
| | |
| | | |
All pos tests up to 3999 have been triaged. One new test in pending.
|
| | |
| | |
| | |
| | |
| | | |
One error gest supporessed now because
it has the same position as a previous one.
|
| | | |
|
|/ /
| |
| |
| |
| |
| | |
Let asSeenFrom generate a marker annotated type
for any unsafe instantiation. Then cleanup in
typedSelect.
|
| | |
|
|/
|
|
| |
The fix solves two cases where we had a deep subtype before.
|
|
|
|
| |
Closes #241 -- that took a while!
|
|
|
|
|
|
|
| |
We now get a cyclic reference when inheriting from an inner class
with the same name in an outer supertype. Since this was legal
in Scala2 it's good to explain that particular case. Test case
in overrideClass.scala
|
| |
|
|
|
|
|
|
|
|
|
| |
This is needed to ensure that the type of a definition node
(ValDef, TypeDef, or DefDef) always refers to the symbol of
that definition.
Caused a spurious error in selfReq to go away (so error count was
updated).
|
|
|
|
|
|
|
| |
Analogous to the previous situation where we do not report a data race
if the previous symbol comes from a superclass, we now do the same if
the previous symbol comes from a given self type. Makes overrideDataRace.scala pass,
and finally enables stdlib test with TraverableViewLike.scala added.
|
| |
|
|
|
|
|
| |
The change in subtyping led to a deep subtype recursion for sets.scala.
It seems legit, so the -Yno-deep-subtypes check is disabled.
|
|
|
|
|
|
| |
Previously adaptIfHK was performed on every type application. This made
t3152 fail. We now do this only on demand, in isSubType. t3152 now passes
again. But the change unmasked another error, which makes Iter2 fail to compile.
|
|
|
|
| |
Also: various cleanups to comments.
|