| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|\
| |
| | |
Change hk take 2
|
| |
| |
| |
| | |
Fixes suggested by @marter when reviewing previous hk PR.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It turns out that asSeenFrom can produce types
that get projected with $apply but that are not
higher-kinded. An exampple failure is in Iter3,
andother in scala.collection.immutable.Map (which is
now part of the test suite).
We now detect that situation, and eta expand the
projected type in `derivedSelect`, this will
force a subssequent `lookupRefined` which will give
the desired normalized type.
Also added is a configurable test that checks that
$apply projected tyeps are in fact higher-kinded.
|
| |
| |
| |
| |
| |
| | |
The original IterableSelfRec is not syntactically legal after
the hk changes. I attempted to fix, but there's still a type error.
Need to investigate whether this is a true error or a bug.
|
| | |
|
| |
| |
| |
| |
| |
| | |
1) Lambda abstract now records bounds of abstracted type parameters in TypeLambda
2) Eta-reduce likewise keeps the bounds it finds in the TypeLambda
3) Eta-reduce now also translates hk$i references to type parameters of the reduced type.
|
| |
| |
| |
| | |
...unless the HK type can be eta-reduced to a class type.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Now also allows to reduce something like
([T] => Map[T, String])
to
Map[_, String]
|
| |
| |
| |
| |
| | |
Accidentally forwarded to rawTypeParams. This solved the problem with mismatching
type params in appliedTo that was caught in testLifted.
|
| | |
|
| |
| |
| |
| |
| | |
Replace occurrences of isLambda with isHK, because isHK is
a bit faster and simplier.
|
| |
| |
| |
| | |
It's no longer needed with new hk scheme.
|
| |
| |
| |
| |
| |
| |
| |
| | |
These are not user-accessible types, so no need to follow
type convention and write in upper case.
Also, rename occurrences of lambda to Lambda, to make clear
we mean a type lambda.
|
| |
| |
| |
| | |
by removing dead case.
|
| |
| |
| |
| | |
Want to have a unique name for Apply, so that tests for higher-kinded types become cheaper.
|
| | |
|
| |
| |
| |
| |
| |
| | |
Previously, only pattern bound arguments were adapated. This was an oversight.
Also, change logix so that we survive empty type parameter lists. This was
also an oversight before.
|
| |
| |
| |
| |
| |
| | |
Turn a possible NPE into an AssertionError. The latter
are caught in pickleTree, so an error leaves a trace about
what was pickled.
|
| |
| |
| |
| |
| |
| | |
Used to be just instantiated lambdas. With the new scheme
every type with a kind higher than * needs to be projected
with #Apply.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Rewrite a type application like
([HK$0] => C[HK$0])(T) to C[T]
Avoids application cahins to become unnecessarly large.
|
| |
| |
| |
| | |
This aligns typeParams and rawTypeParams. It's not strictly to necessary, though.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Discrepancies between numbers of formal and actual type arguments were
observed when typing partialFunctions.scala under new scheme.
Should come back to this when subtyping is rewrittem/simplified to
work with new hk-scheme. Maybe testLifted is no longer needed at all.
|
| |
| |
| |
| |
| | |
Derived types already contain the lambda abstractoion; lambda abstracting
them again would cause a double lambda.
|
| |
| |
| |
| |
| | |
New hk-scheme caused cycles in elimExistentials which are fixed
by this patch.
|
| |
| |
| |
| |
| |
| | |
When unpickling from Scala2 TypeRefs with arguments which do not
refer to classes, use EtaExpand instead of LambdaAbstract. Lambda Abstrct
is wrong since it drops type arguments.
|
| |
| |
| |
| |
| | |
Needed to avoid cycles involving F-boundes hk-types when reading Scala2 collection classes
with new hk-scheme.
|
| |
| |
| |
| |
| | |
parameterizeWith picked between simple hk types and lambda abstraction.
No longer needed because now we always lambda abstract.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
EtaReduce will be used to keep applications on eta expanded methods small.
|
| |
| |
| |
| |
| |
| |
| | |
This would lead to a crash. Example is in Predef:
object Pair
type Pair
|
| |
| |
| |
| |
| | |
Previously, we did this only in applications in rhs of type definitions.
Need to do it everywhere.
|
| |
| |
| |
| |
| | |
Without the additional `typeParams.nonEmpty` condition we got a crash
in t1439.scala
|
| |
| |
| |
| |
| | |
... and move to TypeApplications. isLambda test
was the wrong way before.
|
| |
| |
| |
| |
| |
| | |
Erreneous programs could have a difference in lengths
between type parameters and type args, but this is tested
anyway in Typer.
|
| |
| |
| |
| |
| | |
Now catches attempts to recursively force a LazyRef type
that's in train of being evaluated.
|
| |
| |
| |
| |
| |
| | |
It used to be "assertion error: NoType" whenever sigName git
a projection of a missing member. Now we find out about
what type was projected.
|
| |
| |
| |
| |
| | |
With the hk-types schem changed, we need to make sure that actual and formal argument lists
of parameterized types have the same length.
|
| |
| |
| |
| |
| | |
In Namer, eta expand any type argument that corresponds to a higher-kinded type parameter.
Also, check that all type parameter lists are fully applied.
|
| |
| |
| |
| |
| |
| | |
Avoid forcing info if the reference goes to a class. This avoided
a CyclicReference when reading Scala's standard library form pos/collections
when fiddling with the hk logic.
|
| | |
|
|\ \
| |/
|/| |
ParamForwarding #783: answer my own question.
|
|/ |
|
|\
| |
| | |
Fix 791
|