| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Direct representation of higher-kinded types
|
| |
| |
| |
| |
| | |
Previous logic could only handle classes as constructors.
Also, address other reviewers comments.
|
| | |
|
| |
| |
| |
| | |
This was fixed two commits ago.
|
| |
| |
| |
| | |
Allow hk type parameters to be higher kinded themselves.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When applying a type alias of a type lambda, keep the original
application instead of reducing. But reduce anyway if
- the reduced type is an application where the type
constructor has the same kind as the original type constructor, or
- some of the arguments are wildcards.
|
| |
| |
| |
| |
| | |
Allow definition of types in refinements that do not appear
in parent type.
|
| |
| |
| |
| |
| | |
Allows partially instantiated types as type constrictors when inferring higher-kinded
types.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We cannot handle such types in general. So we now check that a hk application
C[args]
where some of the arguments are wildcards does not have as a supertype
a hk application
([X] -> B)[args]
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- 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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Map self-references in refinements to recursive types. This
commit does this for refinement types appearing in source.
We still have to do it for unpickled refinements.
Test apply-equiv got moved to pending because it simulates
the old higher-kinded type encoding in source, which relies
on the old representation in terms of self-referential refinement
types. The plan is not to adapt this encoding to the new
representation, but to replace it with a different encoding
that makes critical use of the added power of recursive types.
Use recursive types also when unpickling from Scala 2.x.
Add mapInfo method to Denotations.
|
|/ |
|
| |
|
|\
| |
| | |
Fix issue with GADT not typechecking without bind in match
|
| | |
|
|/ |
|
|
|
|
|
| |
This did not work before because we incorrectly looked for their value
in the prefix of the type instead of the type itself.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The issue is subtle: the `tp` in scope in `def ofTypeImplicits` is the
`tp` passed to the top-level `implicitScope` method, not the `tp` passed
to the recursively called `iscope`, this means that before this commit,
all intermediate `OfTypeImplicit` scopes cached while computing an
implicit scope had their `tp` field incorrectly set, which means that we
could miss implicits in later implicit searches.
Note that the `implicit_cache.scala` test worked before this commit
because of the restrictions on caching that exist since
b8b0f381ef2cbcb7bad66fd3e7a9ae929baa45f6, it is included anyway because
our caching strategy might change in the future.
|
| |
|
| |
|
|
|
|
|
|
|
| |
One drawback with this approach is that the type seems to propagate.
I.e. if the return type of an expression is `repeated` then the
enclosing variable will get the `repeated` type instead of getting the
expected `Seq` type
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Unrelated to other commits but useful to get in.
|
| |
|
| |
|
|\ |
|
| | |
|
| | |
|
|/
|
|
| |
It was fixed by 2460f9603b0f0ed1d73dfea99edcee9ba6261d36
|
|\
| |
| | |
Fix Tasty errors
|
| | |
|
| | |
|
|\ \
| |/
|/| |
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.
|
| | |
|
| |
| |
| |
| | |
The intent is that Repr implementations should not bind the Out parameter.
|
| |
| |
| |
| |
| | |
The previous formulation broke for named parameters.
Test case in flowops1.scala.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Simplified logic and now check prefixes of TypeRefs.
Without the simplified logic we would get false cyclic errors for ski.scala.
Test case: flowops.scala
Fixes #1185.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
TailRec methods remain members of enclosing class,
it means that they can refer to methods that require this.type.
It means that tailrec, unlike value classes is not allowed to widen
type of $this to it's full self type.
Fixes #1089
|
| |
| |
| |
| | |
These files were supposed to be remove, their content are now in variances.scala
|
| | |
|
|/ |
|
|
|
|
|
|
| |
Rewriting did not go far enough, as evidenced by pos/i1174.scala
Fixes #1174
|
|\
| |
| | |
Fix typing of SeqLiterals
|
| |
| |
| |
| | |
The test contained an error that was unvovered by the "Nothing is not Nullable" fix.
|
|\ \
| | |
| | | |
Add/collection strawman
|
| | |
| | |
| | |
| | |
| | | |
It worked more or less by accident before. Now it's more complicated,
but we also have tests.
|
| | | |
|