| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Use additional disambiguation criteria before raising a double def error.
See for context: #1240.
Review by @darkdimius
|
|\ \ \ \
| | | | |
| | | | | |
Fix typing of match expressions
|
| | | | |
| | | | |
| | | | |
| | | | | |
Also fix reviewers comments about `firstParent`
|
| | |_|/
| |/| |
| | | |
| | | |
| | | | |
Allow matches between unapply types and selector type where a possible
overlap might exist.
|
|\ \ \ \
| |_|_|/
|/| | | |
Changes to overloading
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fix #1381: Overloading is now changed so that we first try without implicit searches.
Only if that leaves no applicable alternatives we try again with implicit search turned on.
This also fixes test case t2660, which got moved from neg to pos.
|
|\ \ \ \
| |_|/ /
|/| | | |
Improve Xprint
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | | |
* Do not reprint a tree that has not changed.
* Highlight changes with yellow and insertions in green.
* -Xprint-diff-del: Inserts the deleted parts of the tree in red
and the parts that where changed in magenta.
|
|\ \ \
| | | |
| | | | |
Fix 1365: Fix bindings in patterns
|
| | | |
| | | |
| | | |
| | | | |
The dropped lines were both pure functions whose result is ignored.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We need to compare pattern types with expected types in order
to derive knowledge about pattern-bound variables. This is done
use the mechanism of gadt bounds.
|
|\ \ \ \
| | | | |
| | | | | |
Add scala.Dynamic support.
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
|\ \ \ \ \
| |_|_|/ /
|/| | | | |
Implement -Yno-predef and -Yno-imports
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* Implement flags -Yno-predef and -Yno-imports
* Add unit tests for both
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Direct representation of higher-kinded types
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Enable checking of bounds when comparing type lambdas. This invalidates
a pattern used in t2994 and potentially other code, where a bound [X] -> Any
is used as a template that is a legal supertype of all other bounds. The old
behavior is still available under language:Scala2.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Previous logic could only handle classes as constructors.
Also, address other reviewers comments.
|
| | | | | | |
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Beta-reduce only if `Config.simplifyApplications` is true.
Turning off beta-reduction revealed two problems which are
also fixed in this commit:
1. Bad treatement of higher-kinded argyments in cyclicity checking
2. Wrong variance for higher-kinded arguments in TypeAccumulator
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Use (cached) superType where possible.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
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.
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Before the new higher-kinded implementation this wasn't needed because
lambdas were just RefinedTypes.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This bug has been present since we merged this phase.
In the new test `signature-change`, only "Case 1" did not pass before.
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Allows partially instantiated types as type constrictors when inferring higher-kinded
types.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
If there is a new named type param scheme it will almost certainly not
need something like compareAliasedRefined.
Also: harden printer to compute less and thereby avoid
a possible NPE.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
It seemed more cohesive to keep the concepts of "instanceType"
and "approximation" side-by-side.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Gave several times improvement for linker.
|
| | | | | | |
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Previously, a unified or otherwise instantiated type parameter
would be removed from the constraint, i.e. if it was the
last parameter of its polytype to be instantiated, the polytype
would be dropped. This is a potential problem since it means
that the alias `param = instance` is forgetten whereas we might
still need it in the same subtype test sequence.
The solution is to wait with cleaning up polytypes until
all associated type variables are fully instantiated.
This change uncovered another bug, where we failed
to follow an existing instantiation when adding to
a constraint. This manifested itself in deep subtype
errors for run/colltest1 and some others.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
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]
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Printed as <notype> before.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The previous implementation of `replace` made it possible that formerly constrained
parameters would stay on embedded in bounds of other constraint enrties.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Allows us to drop also the involved knownHK method. Lots of other
cleanups.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
1. Make genericType a trait instead of a class.
2. Make TypeLambda a type proxy
3. Split underlying in TypeProxy into underlying and superType
4. Cleanups in many other places
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
We needed fairly specific code to make the refinement based
hk encoding work without cyclic references. With the new
encoding these complications are no longer needed.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Eliminate sameParams, add comments.
Also, minor cleanups elsewhere.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Only use one method instead of a succession of two.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Under direct hk encoding this is no longer needed.
Also, drop now redundant pieces of widenForMatchSelector.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Taking the signature over a type with uninstantiated type variables
means that the signature can change later, once we instantiate the
type variable. We handle this by recording uninstantiated positions
of signatures and fixing them in PostTyper, when type variables are
instantiated.
- This allows to drop the kludge of "normalizing" in derivedRefinedType
Dropping this initially revealed the problems with under-determined
signatures. Now that these problems are fixed, we can drop for good.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Remove the code that implemented the encoding of hk types
using refinements.
Drop the notion that RefinedTypes can be type parameters. This is
no longer true under the new representation.
Also, refactoring MemberBinding -> TypeParamInfo
|