| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
After changes to variance checker and fixes to stdlib.
|
|
|
|
| |
Allows us to compile immutable.Set.
|
|
|
|
|
| |
The change in subtyping led to a deep subtype recursion for sets.scala.
It seems legit, so the -Yno-deep-subtypes check is disabled.
|
|
|
|
| |
Also: various cleanups to comments.
|
|
|
|
|
|
|
| |
Done in order to keep the basics as simple as possible.
Treating existentially bound parameters as still instantiatable type
parameters does not seem to add anything fundamental, and makes the
type system less regular.
|
|\
| |
| | |
TypeComparer: delay looking up members of AndTypes
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In ParFactory.scala we have checks that look like:
(Foo { type Bar = X }) & (Foo { type Bar = X }) <:< (Foo { type Bar = X })
where `Foo` is a recursive type.
Before this commit, we would first try to check this by looking up `Bar`
in the `AndType` on the left, which means looking it up in both branches
and then merging the result, but the merge requires more subtyping
checks, which in turn require looking up a member inside an `AndType`,
seemingly ad infinitum.
We now avoid this by checking if either branch of the `AndType` on the left
is a subtype of the `RefinedType` on the right before looking up a member
in the `AndType` itself.
|
|\ \
| | |
| | | |
Reduce the amount of typing in Namer, fixes compiling Seq
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit fixes two issues which caused us to complete Seq too early and
read it from the classpath instead of from the sources:
- Evaluting RepeatedParamClass forced Seq, this is not necessary
because the type of RepeatedParamClass is a LazyType
- TypeErasure#sigName on a Scala type always forced Seq, even if
the type is not a repeated param type.
This fixes #980.
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
| |
Pickling/unpickling of STABLE modifier allows to fix problem with
unpickling of path-dependent types (#982)
|
|
|
|
|
| |
Thanks to the previous commit, more files now compile without deep
subtyping errors.
|
|
|
|
|
|
|
| |
As demonstrated by tests/pos/hk-deep-subtype.scala, we can avoid some
deep subtype recursions that result in stack overflows by doing this.
Fix #943.
|
| |
|
|
|
|
|
|
| |
By linter:
comparing values of types Char and String using `!=' will always yield
true
|
| |
|
| |
|
|\
| |
| | |
Adapt type parameters of typed eta expansion according to expected variances
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fix problems arising when hierarchies of classes are under completion at the same time.
In this case it can happen that we see a subclass (e.g. Arrays.scala) which depends
on a superclass (e.g. GenTraversableLike.scala) that itself does not have its parents
defined yet. Previously, several things went wrong here
- One of the base classes would be marked as frozen, even though it dod not have all
members entered yet. This led to an error in finger printing.
- The baseclasses and super class bits of the subclass would be computed before the parents
of the middle class were known. The baseclasses would then be chached, leading to
false results for isDerivedFrom.
We need to refine the logic for computing base classes, super class bits, and fingerprints
to account for that issue.
|
| |
| |
| |
| |
| |
| |
| | |
When eta expanding a type `C` to `[vX] => C[X]` the variance `v`
is now the variance of the expected type, not the variance of the
type constructor `C`, as long as the variance of the expected type
is compatible with the variance of `C`.
|
| | |
|
| | |
|
|/
|
|
|
| |
This witnesses that #945 is fixed (by pushing a fix to the
Scala file to dotty-library).
|
| |
|
|
|
|
|
|
|
|
| |
If `x` is not a function or method, then `x _` should be disallowed.
scalac accepts this and converts it to () => x instead. I'd like
to drop this because it's unnecessary and non-obvious. If
-language:Scala2 is on, the behavior is like Scala 2's but
a migration warning is issued.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This reverts commit 05e47a4ac03cad65932a5bbddf506b91e6604f38.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|