aboutsummaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Fix #1503 - be careful where to insert an apply.Martin Odersky2016-09-173-0/+57
| | | | | | `apply` nodes should not be inserted in the result parts of a block, if-then-else, match, or try. Instead they should be added to the surrounding statement.
* Merge pull request #1465 from dotty-staging/fix-#1457odersky2016-09-167-6/+18
|\ | | | | Fix #1457: Three incompatbilities with scalac
| * Add test file.Martin Odersky2016-08-262-0/+15
| |
| * Accommodate Scala2 name resolution schemeMartin Odersky2016-08-263-23/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Scala2 does not conform to spec Section 2, where it says: Bindings of different kinds have a precedence defined on them: 1. Definitions and declarations that are local, inherited, or made available by a package clause and also defined in the same compilation unit as the reference, have highest precedence. 2. Explicit imports have next highest precedence. 3. Wildcard imports have next highest precedence. 4. Definitions made available by a package clause, but not also defined in the same compilation unit as the reference, have lowest precedence. In fact Scala 2, merges (1) and (4) into highest precedence. This commit simulates the Scala2 behavior under -language:Scala2, but gives a migration warning. For the naming-resolution test case we get: dotc *.scala -language:Scala2 -migration callsite.scala:9: migration warning: Name resolution will change. currently selected : naming.resolution.Files in the future, without -language:Scala2: java.nio.file.Files' where Files is a type in package object package which is an alias of java.util.stream.Stream[java.nio.file.Path] Files' is a class in package file def gimmeFiles: Files = Files.list(Paths.get(".")) ^ one warning found
| * Fix #1457: Three incompatbilities with scalacMartin Odersky2016-08-238-6/+26
| | | | | | | | | | | | | | | | Two of these are unavoidable. I moved the tests to diabled/not-representable and added in each case a comment to the main scala file detailing why there is a deviation. The last one (import-rewrite) is fixed.
* | Merge pull request #1514 from OlivierBlanvillain/fix-1513odersky2016-09-162-0/+61
|\ \ | | | | | | Fix #1513: misaligned by name type parameter type bounds
| * | Fix corner case w types ALL passed by name & out of orderOlivier Blanvillain2016-09-161-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | This commit removes a problematic duplicated `checkBounds` call on `TypeApply`. To verify correctness of this change on has to check that `normalizeTree` used only once [1], and the function using `normalizeTree` already takes care of calling `checkBounds`. [1]: https://github.com/lampepfl/dotty/blob/0e8f05d88bfef95fac59f522fd9d06792126bd11/src/dotty/tools/dotc/transform/PostTyper.scala#L205
| * | Fix #1513: misaligned by name type parameter type boundsOlivier Blanvillain2016-09-152-0/+52
| | |
* | | Merge pull request #1469 from dotty-staging/fix-scala.Dynamicodersky2016-09-1634-121/+142
|\ \ \ | | | | | | | | Fixes for scala.Dynamic
| * | | Enable scala.Dynamic pending/untried tests.Nicolas Stucki2016-09-0523-120/+98
| | | |
| * | | Fix #1474: Fix applies to applyDynamic.Nicolas Stucki2016-09-055-0/+1
| | | |
| * | | Fix #1470: Fix dynamic selection in presence of inaccessible members.Nicolas Stucki2016-09-053-0/+1
| | | |
| * | | Fix #1468: Add type parameter support for scala.DynamicNicolas Stucki2016-09-053-1/+42
| | | |
* | | | Improve error message on empty catch blockFelix Mulder2016-09-151-0/+3
| | | |
* | | | Allow try expression without catch or finally, issue warningFelix Mulder2016-09-151-0/+7
| | | |
* | | | Move t1335 test from /pos to /runOlivier Blanvillain2016-09-151-0/+0
| |/ / |/| |
* | | Add missing check file.Martin Odersky2016-09-141-0/+0
| | |
* | | Fix test syntax to make it dotty compatibleMartin Odersky2016-09-141-2/+2
| | |
* | | Add some run testsMartin Odersky2016-09-1411-18/+27
| | |
* | | Merge pull request #1499 from OlivierBlanvillain/fix-1335Felix Mulder2016-09-141-0/+11
|\ \ \ | | | | | | | | Fix #1335: Generate null checks for extractors
| * | | Fix #1335: Generate null checks for extractorsOlivier Blanvillain2016-09-081-0/+11
| |/ /
* / / Partially fix #1500: Implicit search breaks at a certain depthOlivier Blanvillain2016-09-133-0/+68
|/ / | | | | | | | | | | The issue fixed here was introduced by 71027f15. The added `csyms.isEmpty` condition on `case nil =>` is always true, which is clearely a bug. t1500c still fails with covariant (or contravariant) type parameters on `::`, but this seams to be a more complicated issue involving the typer.
* | Merge pull request #1482 from dotty-staging/fix-asapplicable-safeodersky2016-09-042-8/+54
|\ \ | | | | | | More tweaks to type inference
| * | Handle case where expected type of a SeqLiteral has an undetermined element ↵Martin Odersky2016-08-262-8/+54
| | | | | | | | | | | | | | | | | | type. Test case is isApplicableSafe -Ycheck:first.
* | | Fix #1490: type test of union types via type aliasliu fengyun2016-09-012-0/+16
|/ /
* | Dependent method testsMartin Odersky2016-08-264-2/+29
| |
* | More tests recategorizedMartin Odersky2016-08-265-3/+2
| |
* | Make inherited inferred result type work for dependent methodsMartin Odersky2016-08-261-1/+1
| | | | | | | | We did not properly rename parameter references before.
* | Relax matching requirement in unApplyMartin Odersky2016-08-261-0/+0
| | | | | | | | | | | | We now always widen selector type to the superclass if necessary, no matter whether the selector type refers to a trait or a proper class.
* | Move tests to right directoryMartin Odersky2016-08-267-0/+13
| |
* | Test recategorizationMartin Odersky2016-08-262-4/+6
| |
* | Generalize self-referential member comparisons.Martin Odersky2016-08-262-2/+4
| | | | | | | | | | | | | | The special case in hasMatchingMember dealing with self-refential members has to be generalized to deal lower and upper bounds. Test case is t762.scala
* | Type annotations in context enclosing the annotated definitionMartin Odersky2016-08-261-0/+0
| | | | | | | | Fixes SI-7426, which caused a double definition before.
* | Drop out of date commentMartin Odersky2016-08-261-1/+1
| |
* | Add more missing testsMartin Odersky2016-08-268-0/+72
| |
* | Implement alternative desugaring of for-if to filter.Martin Odersky2016-08-263-0/+15
| | | | | | | | | | | | | | Fallback to .filter if a .withFilter is not available, but do this only for .withFilter calls generated from for expressions (this is different from what scalac does; the latter can also rewrite .withFilter calls given in source, which is not desirable.
* | Recategorize testsMartin Odersky2016-08-2678-135/+6
| | | | | | | | | | | | | | | | | | Passing tests from pending/pos go in pos. Some others go in diabled/not-testable. These are tests that require a compilation order which we cannot yet do with our unit testing framework. Compiling them alltogether (as is now doen in junit) does not work either for them because they contain a duplicate class.
* | GADT testMartin Odersky2016-08-261-2/+2
| | | | | | | | | | This one failed in getters before because a (previously unchecked) assignment was turned into a checked application. Now it passes.
* | Merge pull request #1460 from dotty-staging/fix-t1756odersky2016-08-262-59/+33
|\ \ | | | | | | Make sure arguments are evaluated in the correct typer state.
| * | Make sure arguments are evaluated in the correct typer state.Martin Odersky2016-08-212-59/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's a tricky interaction with caching of typed arguments in FunProto types and backtracking using different typer states. We might end up with a typed argument that is evaluated in one typer state and that is used in another. The problem is that the argument typing might have inserted type variables (maybe by adding polymorphic implicit views) that are not registered in the typer state in which the application is finally typed. In that case we will see an "orphan poly parameter" in pickling. The fix is to discard argument types is their typerstate is not committed to the one in which the application is finally typed. To apply the fix we need to track - for typer states: whether or not it was committed, and what its parent is. - for function prototypes: the typer state in which an argument with cached type was evaluated. Test case is t1756.scala, which produced an "orphan poly parameter CI" before.
* | | add test set for exhaustivity and redundancy checkliu fengyun2016-08-24136-0/+3184
| |/ |/|
* | Three incompatibilities with scalac.Ólafur Páll Geirsson2016-08-238-0/+64
| | | | | | | | | | | | Using Scala 2.11.8 and dotty at bcfa3be8cfe2be. cc/ #1457
* | Merge pull request #1456 from dotty-staging/fix-#1444odersky2016-08-215-5/+49
|\ \ | |/ |/| Fix #1444: Pass implicits to parameterless traits if needed
| * Fix testMartin Odersky2016-08-201-1/+1
| |
| * Fix #1444: Add implicit arguments to supertraitsMartin Odersky2016-08-205-5/+49
| | | | | | | | | | | | | | | | If a super trait is given as a type (i.e. no argument list), implicit args were not passed. This is fixed now. Also, we now check for parameterized traits lacking type arguments in Typer instead of in Mixin. Fixes #1444.
* | Merge pull request #1459 from dotty-staging/tests3odersky2016-08-215-30/+31
|\ \ | | | | | | Refinements to auto-tupling
| * | Address reviewers comments.Martin Odersky2016-08-211-4/+2
| | |
| * | Add import back.Martin Odersky2016-08-181-0/+2
| | | | | | | | | | | | Needed because the test is also run in neg wihtout command line option.
| * | Test reshufflingMartin Odersky2016-08-183-25/+5
| | | | | | | | | | | | | | | | | | - Delete redundant t2660 (exists elready in pos) - Comment t1756 - Recategorize tryexpr
| * | Refinements to auto tuplingMartin Odersky2016-08-182-4/+25
| |/ | | | | | | | | | | | | | | | | | | There's a nasty interaction with auto-tupling and trying to insert an implicit on the qualifier of a call. If the original call fails, we need to "undo" any auto-tupling decisions in calls where an implicit is inserted on the qualifier. Also: Needed to fix canAutoTuple test so that Scala2 feature is checked instead of dotty's. Also: Drop features in dotty.language that duplicate those in scala.language.