aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* fix #1354: improve type test and typecast of union typesliu fengyun2016-07-261-8/+23
|
* Adress reviewers commentsMartin Odersky2016-07-251-1/+1
|
* Fix #1385: Temporarily lift 22 limit for functionsMartin Odersky2016-07-253-2/+50
|
* Resume suspensions also when reading from classfilesMartin Odersky2016-07-224-10/+17
| | | | | Make treatment in Scala2Unpickler and Namer the same and factor out common functionality.
* Fix #1401: Make sure all refs are forwardedMartin Odersky2016-07-214-9/+33
| | | | | | | | | | | | Faced with recursive dependencies through self types, we might have to apply `normalizeToClassRefs` to a class P with a parent that is not yet initialized (witnessed by P's parents being Nil). In that case we should still execute forwardRefs on P, but we have to wait in a suspension until P is initialized. This avoids the problem raised in #1401. I am still not quite sure why forwardRefs is needed, but it seems that asSeenFrom alone is not enough to track the dependencies in this case.
* Tweaks to printingMartin Odersky2016-07-212-2/+2
| | | | | - increase page width - print scopes more legibly under -verbose
* Merge pull request #1395 from dotty-staging/fix-#1378odersky2016-07-215-4/+34
|\ | | | | Fix #1378: Propagate more knowledge of result type into applications
| * Adress reviewers commentsMartin Odersky2016-07-173-8/+10
| |
| * Proparage function result constrains when inferring parameter typesMartin Odersky2016-07-164-2/+30
| | | | | | | | | | | | | | | | If an application has functions with implicit parameter types we need to be more aggressive about propagating knowledge of the expected result type into the constraint. Fixes #1378.
| * Add recursive calls to classBoundMartin Odersky2016-07-161-2/+2
| | | | | | | | As observed by @smarter, makes sense to do this.
* | Make -Xprint-diff an opt-in option.Nicolas Stucki2016-07-202-3/+6
| | | | | | | | | | | | * -Xprint:[...] alone prints the trees without diffs. * -Xprint-diff enables the diff on -Xprint. * -Xprint-diff-del enables the diff with deletes on -Xprint.
* | Merge pull request #1402 from dotty-staging/fix-wildcard-protosGuillaume Martres2016-07-192-4/+7
|\ \ | | | | | | Fix wildcard protos
| * | Refine printing of tuple an function types with wildcardsMartin Odersky2016-07-191-3/+3
| | |
| * | Allow function prototypes to have wildcards.Martin Odersky2016-07-191-1/+4
| | |
* | | Merge pull request #1400 from dotty-staging/fix/hk-reduce-typerefsodersky2016-07-192-15/+9
|\ \ \ | |/ / |/| | HK reduction: Remove special-case for typerefs
| * | HK reduction: Remove special-case for typerefsGuillaume Martres2016-07-182-15/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The special case: case stripped: TypeRef => stripped.symbol.is(BaseTypeArg) is wrong because you might still want to reduce applications involving TypeRefs which are not base class parameters, like in: class Foo[A] type Alias[X] = Foo[X] val x: Alias[Int] = ??? `Alias` is a TypeRef so before this commit `Alias[Int]` was never reduced to `Foo[Int]`. It should have been: case stripped: TypeRef if stripped.symbol.is(BaseTypeArg) => true But even this is incorrect: it assumes that we can always safely reduce HK applications involving base class parameters, this is not the case when the parameter kind is different from the rhs kind as illustrated by `i1181c.scala`. We fix this by simply dropping the special case.
* | | Merge pull request #1393 from dotty-staging/fix-#1386odersky2016-07-181-6/+36
|\ \ \ | | | | | | | | Fix #1386: Reduce double def errors
| * | | Refactor code into nested methodMartin Odersky2016-07-151-5/+6
| | | | | | | | | | | | | | | | mergeDenot is already large as it is.
| * | | Refine disambiguation logic and add test case.Martin Odersky2016-07-151-3/+14
| | | |
| * | | Fix #1386: Reduce double def errorsMartin Odersky2016-07-151-6/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use additional disambiguation criteria before raising a double def error. See for context: #1240. Review by @darkdimius
* | | | Merge pull request #1399 from dotty-staging/fix-patmat-typingodersky2016-07-181-8/+12
|\ \ \ \ | | | | | | | | | | Fix typing of match expressions
| * | | | Add test caseMartin Odersky2016-07-181-1/+1
| | | | | | | | | | | | | | | | | | | | Also fix reviewers comments about `firstParent`
| * | | | 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
| | | | | |