aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | Fix typing of match expressionsMartin Odersky2016-07-171-8/+12
| | |_|/ | |/| | | | | | | | | | | | | | Allow matches between unapply types and selector type where a possible overlap might exist.
* | | | Merge pull request #1389 from dotty-staging/fix-#1381odersky2016-07-182-70/+71
|\ \ \ \ | |_|_|/ |/| | | Changes to overloading
| * | | Changes to overloadingMartin Odersky2016-07-152-70/+71
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge pull request #1345 from dotty-staging/improve-XprintDmitry Petrashko2016-07-173-9/+104
|\ \ \ \ | |_|/ / |/| | | Improve Xprint
| * | | Fix #1312: Improve XprintNicolas Stucki2016-07-153-9/+104
| |/ / | | | | | | | | | | | | | | | | | | * 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.
* | | Merge pull request #1377 from dotty-staging/#1365odersky2016-07-152-22/+67
|\ \ \ | | | | | | | | Fix 1365: Fix bindings in patterns
| * | | Drop superfluous codeMartin Odersky2016-07-151-5/+1
| | | | | | | | | | | | | | | | The dropped lines were both pure functions whose result is ignored.
| * | | Fix 1365: Fix bindings in patternsMartin Odersky2016-07-092-22/+71
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge pull request #1291 from nicolasstucki/implement-scala-dynamicDmitry Petrashko2016-07-1510-20/+164
|\ \ \ \ | | | | | | | | | | Add scala.Dynamic support.
| * | | | Fix TypeOps.featureEnabled ignoring import disabling.Nicolas Stucki2016-07-071-9/+10
| | | | |
| * | | | Add scala.Dynamic language feature check.Nicolas Stucki2016-07-075-4/+45
| | | | |
| * | | | Fix #657: Add scala.Dynamic support.Nicolas Stucki2016-07-076-7/+109
| | | | |
* | | | | Merge pull request #1334 from dotty-jvican/implement-no-predef-no-importDmitry Petrashko2016-07-152-6/+15
|\ \ \ \ \ | |_|_|/ / |/| | | | Implement -Yno-predef and -Yno-imports
| * | | | Implement -Yno-predef and -Yno-importsjvican2016-06-292-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement flags -Yno-predef and -Yno-imports * Add unit tests for both
* | | | | Merge pull request #1343 from dotty-staging/change-hk-direct2odersky2016-07-1550-1337/+1914
|\ \ \ \ \ | | | | | | | | | | | | Direct representation of higher-kinded types
| * | | | | Bounds of type lambdas compare contravariantlyMartin Odersky2016-07-151-12/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | Fix bounds checking of hk applied typedMartin Odersky2016-07-144-46/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previous logic could only handle classes as constructors. Also, address other reviewers comments.
| * | | | | Allow hk parameters in lower boundsMartin Odersky2016-07-134-17/+8
| | | | | |
| * | | | | Simplify variance computationsMartin Odersky2016-07-131-6/+2
| | | | | |
| * | | | | Make rewritings of hk applications configurableMartin Odersky2016-07-134-18/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | | Optimize hk comparisonsMartin Odersky2016-07-132-11/+24
| | | | | | | | | | | | | | | | | | | | | | | | Use (cached) superType where possible.
| * | | | | Drop restriction to 2nd order hk typesMartin Odersky2016-07-121-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | Allow hk type parameters to be higher kinded themselves.
| * | | | | Avoid dealiasing on type applicationMartin Odersky2016-07-126-53/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 new types in refinementsMartin Odersky2016-07-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow definition of types in refinements that do not appear in parent type.
| * | | | | ExtractAPI: Add support for RecTypeGuillaume Martres2016-07-121-2/+14
| | | | | |
| * | | | | ExtractAPI: Add support for TypeLambdasGuillaume Martres2016-07-121-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before the new higher-kinded implementation this wasn't needed because lambdas were just RefinedTypes.
| * | | | | ExtractAPI: Do not miss value parameters of PolyTypesGuillaume Martres2016-07-121-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bug has been present since we merged this phase. In the new test `signature-change`, only "Case 1" did not pass before.
| * | | | | Address reviewers commentsMartin Odersky2016-07-1111-49/+55
| | | | | |
| * | | | | Fix SI-2712Martin Odersky2016-07-116-18/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows partially instantiated types as type constrictors when inferring higher-kinded types.
| * | | | | Drop compareAliasedRefinedMartin Odersky2016-07-112-37/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | Refactor Typevar instantiationMartin Odersky2016-07-112-43/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seemed more cohesive to keep the concepts of "instanceType" and "approximation" side-by-side.
| * | | | | Add a case where caching was missing.Martin Odersky2016-07-112-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | Gave several times improvement for linker.
| * | | | | Do the right thing for NoDenotation.mapInfoMartin Odersky2016-07-111-0/+1
| | | | | |
| * | | | | Unify aliases when taking a lub.Martin Odersky2016-07-111-2/+18
| | | | | |
| * | | | | Less eager removal of type parameters from constraintMartin Odersky2016-07-113-24/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | Disallow higher-kinded types that simulate general existential typesMartin Odersky2016-07-113-5/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]
| * | | | | Fix bug in printing untyped New nodes.Martin Odersky2016-07-111-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | Printed as <notype> before.
| * | | | | Avoid orphan parameters in Constraint#replaceMartin Odersky2016-07-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous implementation of `replace` made it possible that formerly constrained parameters would stay on embedded in bounds of other constraint enrties.
| * | | | | Drop Config.checkKindsMartin Odersky2016-07-1113-107/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows us to drop also the involved knownHK method. Lots of other cleanups.
| * | | | | Refactorings of GenericTypes and underlying/upperboundMartin Odersky2016-07-119-146/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | | Revert complications in asMemberOfMartin Odersky2016-07-112-25/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | Cleanup of Signature matchingMartin Odersky2016-07-114-14/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eliminate sameParams, add comments. Also, minor cleanups elsewhere.
| * | | | | Simplify appliedToMartin Odersky2016-07-111-23/+9
| | | | | | | | | | | | | | | | | | | | | | | | Only use one method instead of a succession of two.
| * | | | | Get rid of BindingKindMartin Odersky2016-07-115-65/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under direct hk encoding this is no longer needed. Also, drop now redundant pieces of widenForMatchSelector.
| * | | | | Handle signatures over uninstantiated type variablesMartin Odersky2016-07-115-12/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 refinement encoding of hk typesMartin Odersky2016-07-1117-653/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | | Fixes for printing under -Ytest-picklerMartin Odersky2016-07-112-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Make printing package ids more robost Crashed before when printers were turned on during test pickling mode. - Make Denotation#bringForward more robost Assertion failed before when printers were turned on during test pickling mode.
| * | | | | Fix parameter unpicklingMartin Odersky2016-07-111-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Parameter names always come in as term names, ahve to be explicitly converted to type names. The previous implementation used a cast instead of a conversion, which caused a ClassCastException. For symmetry we model readParamNames such that it returns a List[Name] which has to be explicitly converted to a List[TermName] or a List[TypeName], using a map.
| * | | | | Drop assertion in TypeMapMartin Odersky2016-07-112-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The deleted assertion could fail for code that was erroneous. - Enable new hk scheme.
| * | | | | Special case for TypeRefs in upperboundMartin Odersky2016-07-111-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Done for efficiency. Also that way we would do something meaningful if the type constructor was, say, Nothing. However, that case is now rules out anyways.