aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | -Yplain-printer: do not print positions by defaultGuillaume Martres2017-03-121-1/+1
|/ / / / / | | | | | | | | | | | | | | | You can still have positions printed by explictly passing -Yprintpos
* | | | | Merge pull request #2078 from dotty-staging/fix-#1569-v2Guillaume Martres2017-03-125-26/+41
|\ \ \ \ \ | | | | | | | | | | | | Fix #360: Improve avoidance algorithm
| * | | | | Comment ApproximatingTypeMapMartin Odersky2017-03-121-0/+7
| | | | | |
| * | | | | Improve definition and doc comment for ensureNoLeaksMartin Odersky2017-03-122-23/+22
| | | | | | | | | | | | | | | | | | | | | | | | No more try-again business necessary.
| * | | | | Add original test case of #360Martin Odersky2017-03-121-0/+6
| | | | | |
| * | | | | Fix #1569: Improve avoidance algorithmMartin Odersky2017-03-123-13/+16
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | The essential change is that we do not throw away more precise info of the avoided type if the expected type is fully defined.
* | | | | Merge pull request #2076 from dotty-staging/fix/override-java-varargsodersky2017-03-125-6/+30
|\ \ \ \ \ | | | | | | | | | | | | Fix overriding a Java method with varargs
| * | | | | ElimRepeated: Do not use installAfterGuillaume Martres2017-03-121-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was a mistake introduced in the previous commit, installAfter is only safe to use in `IdentityDenotTransformer` phases, otherwise it means that the phase denotation transformer is not run at all for this particular denotation, this caused Ycheck to fail.
| * | | | | Fix overriding a Java method with varargsGuillaume Martres2017-03-125-4/+20
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If A method like: override def foo(x: Object*) overrides a Java method, it needs to be rewritten as: def foo(x: Seq[Object]) override def foo(x: Array[Object]): Object = foo(Predef.wrapRefArray(x)) This should be handled by ElimRepeated but there were two bugs: - `addVarArgsBridge` was called at phase `thisTransformer.next`, this is too late to create the bridge since `T*` has already been rewritten as `Seq[T]` - The original method symbol needs to have the `override` flag dropped, since it doesn't override anything. Furthermore, RefChecks had to be moved after ElimRepeated, otherwise the testcase would fail the overriding checks.
* | | | | Merge pull request #2075 from dotty-staging/fix/tasty-testsodersky2017-03-123-1/+0
|\ \ \ \ \ | |/ / / / |/| | | | Move tests/tasty/* to tests/pickling/*
| * | | | Move tests/tasty/* to tests/pickling/*Guillaume Martres2017-03-113-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | These two directories were tested using the same flags, but tests/tasty compiled all of its files at once which is usually not what is intended.
* | | | | Merge pull request #1884 from MasseGuillaume/restore-delegating-reporterFelix Mulder2017-03-112-8/+14
|\ \ \ \ \ | |/ / / / |/| | | | restore position offset in DelegatingReporter
| * | | | restore position offset in DelegatingReporterGuillaume Massé2017-01-062-8/+14
| | | | |
* | | | | Merge pull request #2070 from dotty-staging/fix/erasedLubodersky2017-03-092-4/+23
|\ \ \ \ \ | | | | | | | | | | | | Fix bug in erasedLub leading to incorrect signatures
| * | | | | Fix bug in erasedLub leading to incorrect signaturesGuillaume Martres2017-03-082-4/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, the added testcase failed in a strange way: 14 | def bla(foo: Foo) = orElse2(identity).apply(foo) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |value of type <nonsensical><notype></nonsensical> does not take parameters This happened because the TermRef for the apply method had an incorrect signature, therefore its underlying type was NoType. According to the documentation of `erasedLub`, the erasure should be: "a common superclass or trait S of the argument classes, with the following two properties: S is minimal: no other common superclass or trait derives from S] S is last : in the linearization of the first argument type `tp1` there are no minimal common superclasses or traits that come after S. (the reason to pick last is that we prefer classes over traits that way)." I'm not convinced that the implementation satisfies either of these two properties, but this commit at least makes S closer to being minimal by making sure that the last best candidate never derives from it.
* | | | | | Merge pull request #2068 from dotty-staging/fix-#2064odersky2017-03-092-8/+22
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix #2064: Avoid illegal types in OrDominator
| * | | | | | Fix commentMartin Odersky2017-03-081-2/+3
| | | | | | |
| * | | | | | Better fixMartin Odersky2017-03-082-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `superType` should never return a `TypeBounds` in the first place. This commit makes sure it doesn't.
| * | | | | | Fix #2064: Avoid illegal types in OrDominatorMartin Odersky2017-03-082-1/+16
| | |_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | Need to skip type bounds in `underlying` chain, since TypeBounds is not a legal operand type for OrType.
* | | | | | Merge pull request #2045 from dotty-staging/fix-hlist-hmapodersky2017-03-0923-64/+430
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix type inference for HLists and HMaps
| * | | | | | Adress reviewers commentsMartin Odersky2017-03-032-2/+8
| | | | | | |
| * | | | | | More testsMartin Odersky2017-03-023-1/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | and a typo fixed
| * | | | | | New test: covariant hmapsMartin Odersky2017-03-021-0/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Type inference tends to take quite different paths for non-variant and variant data structures. Since, non-variant hmap has already exposed quite a few problems, it's good to test it also in the covariant case.
| * | | | | | Move depmeth tests back to pendingMartin Odersky2017-03-012-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I believe this worked only accidentally because we matched more things with wildcards which turned out to be flawed. The test errors show some funky _#_ types, so not sure whether the tests are still valid or not. Moved back to pending awaiting further resolution.
| * | | | | | Make alignArgsInAnd safe and turn it on by defaultMartin Odersky2017-03-015-28/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Turned out hmaps.scala requires the arg alignment to compile. So we have our first counterexample that we cannot drop this hack. Now it is made safe in the sense that no constraints get lost anymore.
| * | | | | | Fix handling of dependent method typesMartin Odersky2017-03-015-10/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Need to use fresh PolyParams instead of WildcardTypes if constraint is committable.
| * | | | | | Drop duplication in testMartin Odersky2017-03-011-71/+0
| | | | | | |
| * | | | | | Add non-variant version of HLists for completenessMartin Odersky2017-02-282-0/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Variance changes quite a few things for type inference, so it's good to check a non-variant version as well.
| * | | | | | Add check fileMartin Odersky2017-02-281-0/+1
| | | | | | |
| * | | | | | Re-instantiate depmeth testsMartin Odersky2017-02-284-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These now compile with the changes to dependent methods, except for one which is invalid under dotty.
| * | | | | | Independent test case, mentioned in #2004.Martin Odersky2017-02-281-0/+11
| | | | | | |
| * | | | | | New testMartin Odersky2017-02-282-0/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The HLists test brought out the unsoundness of alias rewriting in glbs which is tackled in the last commit.
| * | | | | | Don't align aliases in refined types by defaultMartin Odersky2017-02-282-14/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We previously tried to force S1 and S2 be the same type when encountering a lub like `T1 { A = S1 } & T2 { A = S2 }`. The comments in this commit explain why this is unsound, so this rewrite is now made subject to a new config option, which is off by default. I verified that the new behavior does not affect the performance of the junit tests.
| * | | | | | Systematic treatment of result types of dependent methodsMartin Odersky2017-02-283-31/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We approximate dependencies to parameters by Wildcards. This was already done in one place, is now done in other places as well, instead of doing nothing for dependent methods.
| * | | | | | Constrain results of dependent implicitsMartin Odersky2017-02-281-14/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No reason why we should not - normalize handles implicit methods just fine. This fixes type errors in test HLists.scala.
| * | | | | | Fix printing of refined applied typesMartin Odersky2017-02-282-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If an applied type has a refinement, it was printed before as one large refinement type including the type parameter bindings.
* | | | | | | Merge pull request #2049 from ennru/ennru_RecursiveNeedsTypeodersky2017-03-095-10/+151
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Change "recursive/cyclic definitions needs type" errors to Message
| * | | | | | | Analysis of overloaded or recursive is harder than expectedEnno Runne2017-03-074-26/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fall-back to reporting "overloaded or recursive needs type".
| * | | | | | | More detail in error messagesEnno Runne2017-03-055-10/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split error messages for recursive method and overloaded method needs type into two (but did not solve the analysis which to show). Make CyclicReference type error construct corresponding error message.
| * | | | | | | Explanations for recursive/cyclic type requirementsEnno Runne2017-03-042-21/+81
| | | | | | | |
| * | | | | | | Merge branch 'master' of https://github.com/lampepfl/dotty into ↵Enno Runne2017-03-0232-71/+462
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | ennru_RecursiveNeedsType
| * | | | | | | | Change 'overloaded/recursive method/value needs type' to Message (see #2026)Enno Runne2017-02-244-6/+54
| | | | | | | | |
* | | | | | | | | Merge pull request #2065 from dotty-staging/change-implicit-conv2odersky2017-03-0912-14/+81
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Disallow subtypes of Function1 acting as implicit conversions
| * | | | | | | | | Drop special case around Function1Martin Odersky2017-03-088-26/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now only Scala2 mode treats Function1's as implicit conversions. Instead we introduce a new subclass ImplicitConverter of Function1, instances of which are turned into implicit conversions.
| * | | | | | | | | Fix condition logicMartin Odersky2017-03-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I introduced an error in the refactoring two commits ago.
| * | | | | | | | | Add puzzler 54 as a testMartin Odersky2017-03-081-0/+13
| | | | | | | | | |
| * | | | | | | | | Keep old behavior under -language:Scala2Martin Odersky2017-03-081-2/+8
| | | | | | | | | |
| * | | | | | | | | Disallow subtypes of Function1 acting as implicit conversionsMartin Odersky2017-03-086-8/+42
| | |_|_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new test `falseView.scala` shows the problem. We might create an implicit value of some type that happens to be a subtype of Function1. We might now expect that this gives us an implicit conversion, this is most often unintended and surprising. See the comment in Implicits#discardForView for a discussion why we picked the particular scheme implemented here.
* | | | | | | | | Merge pull request #2057 from dotty-staging/merge-companionodersky2017-03-092-31/+98
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | support merging companion objects in expanded trees
| * | | | | | | | | address review feedbackliu fengyun2017-03-072-29/+35
| | | | | | | | | |