aboutsummaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | 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.
| * | | | 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.
* | | | | Merge pull request #2065 from dotty-staging/change-implicit-conv2odersky2017-03-099-9/+34
|\ \ \ \ \ | | | | | | | | | | | | Disallow subtypes of Function1 acting as implicit conversions
| * | | | | Drop special case around Function1Martin Odersky2017-03-085-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | Add puzzler 54 as a testMartin Odersky2017-03-081-0/+13
| | | | | |
| * | | | | Disallow subtypes of Function1 acting as implicit conversionsMartin Odersky2017-03-084-3/+13
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* / | | | Fix #2067: Compute defKind at Typer, not NamerMartin Odersky2017-03-081-0/+3
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | It's hard to predict for defKind all the desugarings that can be applied to a definition. Better to do it once the desugarings have been applied. NoInit and PureInterface are both tested only after Typer, so it's OK to delay their initialization until regular Typer.
* | | | Don't set PureInterface when a default param is presentGuillaume Martres2017-03-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default param will be desugared into a method with a body, so setting PureInterface would be wrong. The enclosed test previously failed with a pickling difference, because the unpickler correctly decided to not set the PureInterface flag since it saw the default param method. This fixes the tasty_dotc_util which failed since the last commit because FreshNameCreator was now incorrectly recognized as a PureInterface.
* | | | Disable most tests that depend on scala-reflectGuillaume Martres2017-03-086-0/+0
| |/ / |/| |
* | | Merge pull request #2059 from dotty-staging/fix/inline-EmptyTreeodersky2017-03-071-0/+13
|\ \ \ | |_|/ |/| | Fix #2056: Backend crash when inlined method contains try
| * | Fix #2056: Backend crash when inlined method contains tryGuillaume Martres2017-03-071-0/+13
| | | | | | | | | | | | | | | | | | In various places we do "case EmptyTree =>", since Tree#equals uses reference equality this means that EmptyTree should never be copied, otherwise some other code path will be taken.
* | | Update repl check filesMartin Odersky2017-03-052-3/+3
| | | | | | | | | | | | | | | | | | Deleting an error message changes all subsequent error message umbers, which means that REPL tests were invalidated. This is a bit unfortunate from a testing standpoint.
* | | Drop named type parameters in classesMartin Odersky2017-03-041-0/+12
|/ / | | | | | | | | | | | | | | | | | | | | | | | | Drop the [type T] syntax, and what's associated to make it work. Motivation: It's an alternative way of doing things for which there seems to be little need. The implementation was provisional and bitrotted during the various iterations to introduce higher-kinded types. So in the end the complxity-cost for language and compiler was not worth the added benefit that [type T] parameters provide. Noe that we still accept _named arguments_ [A = T] in expressions; these are useful for specifying some parameters and letting others be inferred.
* | Merge pull request #2031 from dotty-staging/fix-#2030odersky2017-03-033-8/+11
|\ \ | | | | | | Fix #2030: Don't chain implicit conversions
| * | Test polishingMartin Odersky2017-02-272-8/+6
| | |
| * | Don't chain implicit conversionsMartin Odersky2017-02-271-0/+5
| | | | | | | | | | | | | | | | | | | | | When inferring a view, we are not allowed to use another implicit conversion to adapt its result. Fixing this revealed another problem where we have to re-enable implicit conversions when pre-typing arguments in overloading resolution.
* | | Allow abstract type members in objects.Nicolas Stucki2017-03-012-2/+3
| |/ |/|
* | Merge pull request #2035 from dotty-staging/fix-#2033Guillaume Martres2017-02-281-0/+21
|\ \ | | | | | | Fix #2033: Improve handling of unresolved overloaded arguments
| * | Fix #2033: Improve handling of unresolved overloaded argumentsMartin Odersky2017-02-271-0/+21
| |/
* | Merge pull request #2011 from dotty-staging/hmap-testodersky2017-02-271-0/+97
|\ \ | |/ |/| HMap test case
| * Update HMap testOlivier Blanvillain2017-02-201-44/+24
| |
| * Add HMap test caseOlivier Blanvillain2017-02-201-0/+117
| |
* | Merge pull request #1993 from dotty-staging/add-lazy-implicitsodersky2017-02-254-0/+150
|\ \ | | | | | | Treat implicit by-name arguments as lazy values
| * | Treat implicit by-name arguments as lazy valuesMartin Odersky2017-02-174-0/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the previous rules, the two test cases produce a diverging implicit expansion. We avoid this by creating for every implicit by-name argument of type T a lazy implicit value of the same type. The implicit value is visible for all nested implicit searches of by-name arguments. That way, we tie the knot and obtain a recursive lazy value instead of a diverging expansion.
* | | Merge pull request #2026 from dotty-staging/fix-#2001odersky2017-02-241-0/+6
|\ \ \ | | | | | | | | Better error messages for missing type of recursive definitions
| * | | Better error messages for missing type of recursive definitionsMartin Odersky2017-02-231-0/+6
| | | |
* | | | Merge pull request #2015 from dotty-staging/add-pf-overloadingodersky2017-02-231-0/+41
|\ \ \ \ | |/ / / |/| | | Add overloading support for case-closures
| * | | Extend argument pretyping to case-closuresMartin Odersky2017-02-211-5/+5
| | | |
| * | | Add overloading support for case-closuresMartin Odersky2017-02-211-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | case-closures (which are represented as Match nodes) have a known arity just like other function literals. So shape analysis for overloading resolution should apply to them as well.
* | | | Merge pull request #2021 from dotty-staging/fix-#2020Guillaume Martres2017-02-221-0/+8
|\ \ \ \ | | | | | | | | | | Fix #2020: Only the first parameters of a case class are caseaccessors
| * | | | Fix #2020: Only the first parameters of a case class are caseaccessorsMartin Odersky2017-02-221-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | Only the parameters in the first parameter list of a case class should get the `CaseAccessor` flag. Fixes #2020.
* | | | | Fix #2009: Fix placeholder params logic for lambdas (#2019)odersky2017-02-221-0/+9
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix #2009: Fix placeholder params logic for lambdas Logic was missing placeholders in rhs of lambdas. * Add comment * Fix typo
* | | | Merge pull request #2014 from dotty-staging/fix-#2002odersky2017-02-222-0/+27
|\ \ \ \ | | | | | | | | | | Fix #2000: Make implicit and non-implicit functions incomparable
| * | | | Fix #2000: Make implicit and non-implicit functions incomparable with <:<Martin Odersky2017-02-212-0/+27
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implicit and non-implicit functions are incomparable with <:<, but are treated as equivalent with `matches`. This means implicit and non-implicit functions of the same types override each other, but RefChecks will give an error because their types are not subtypes. Also contains a test for #2002.
* | | | Merge pull request #1997 from dotty-staging/fix-#1992odersky2017-02-222-0/+16
|\ \ \ \ | | | | | | | | | | Fix off-by-one error in forward reference checking
| * | | | Fixed #2005: Add test case.Nicolas Stucki2017-02-211-0/+7
| | | | |
| * | | | Fix off-by-one error in forward reference checkingMartin Odersky2017-02-181-0/+9
| | | | |
* | | | | Merge pull request #1974 from dotty-staging/fix/ctx-captureodersky2017-02-211-1/+1
|\ \ \ \ \ | | | | | | | | | | | | Avoid accidental captures of Context
| * | | | | typedApply: Avoid using incorrect context in tryEitherGuillaume Martres2017-02-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the following code accidentally used the implicit Context parameter of `typedApply`: tryEither { implicit ctx => typedOpAssign
* | | | | | Merge pull request #1984 from dotty-staging/fix-#1747-v2odersky2017-02-211-0/+3
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix #1747: Improve error message for Scala/Java type mismatch
| * | | | | | Fix test case^2Martin Odersky2017-02-151-2/+2
| | | | | | |
| * | | | | | Fix test caseMartin Odersky2017-02-151-1/+1
| | | | | | |
| * | | | | | Tweak printing of polymrophic methodsMartin Odersky2017-02-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Omit the `=>' if a PolyType has a MethodType as result type.
* | | | | | | Merge pull request #2013 from dotty-staging/fix-#2006Nicolas Stucki2017-02-211-0/+10
|\ \ \ \ \ \ \ | |_|_|_|_|/ / |/| | | | | | Don't inline when errors are detected