| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
make successive underlying values an iterator (so that we
do not run into a stackoverflow in case of cycles).
|
|
|
|
| |
Logging while printing messes up the recursion counts.
|
| |
|
|
|
|
|
|
| |
withMode sets the whole mode, nit an individual bits. This was used
wrongly in several places. Make this less of a trap by renaming
withMode -> withModeBits.
|
|
|
|
|
| |
Some subtype tests should not instantiate type variables, in particular
those having to do with & and |.
|
|
|
|
|
| |
Can assume P#T <: Q#T if P <: Q. This follows from
the rules how we expand # to existentials.
|
|
|
|
|
|
| |
containsSig still used param-only matching, which is incorrect
in the new system, because different overloaded methods may have the
same parameter signature.
|
|
|
|
|
|
|
| |
1) Matching after erasure also takes wildcards into account
(before it didn't).
2) Combine all signature matching operations into a single matchDegree method.
|
|
|
|
|
|
|
|
| |
When setting the denotation we did not change the checked period.
This can lead to a situation where a denotation is set to NoDenotation,
yet the checked period is something else. This means in effect the denotation
will vanish at the checked period. This bug caused the junit test failure
about "non-member exception" for sourceFile in DottyBackendInterface.
|
|
|
|
|
|
| |
atSignature should also check result type names, except
- if one of the result is a wildcard
- a boolean flag relaxed is explicitly set
|
|
|
|
|
| |
When determining what to refine we should not rely only on signatures
but we need full denotation matching.
|
|
|
|
|
| |
With the new approach to matching it is no longer sound.
We always have to match infos anyway to be sure.
|
|
|
|
|
|
|
|
| |
Whenchecking whether two denotations match it is not enough
to look at the signatures. The signatures might match (on the
parameters) but the actual parametre types might be different.
The change always tests infos after signatures, effectively
turning the signature test into a pre-filter.
|
| |
|
|\
| |
| | |
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.
|
| | |
|
| |
| |
| |
| |
| |
| | |
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
|