aboutsummaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Fix TypeMismatch not getting nonsensical tags in some casesFelix Mulder2016-10-102-10/+10
| | | | Thanks @smarter!
* Fix reporting of ErrorTypes in highlighted segmentsFelix Mulder2016-10-102-10/+10
|
* Make `typeDiff` aware of placeholder typesFelix Mulder2016-10-101-7/+7
|
* Refactor explanation interpolatorFelix Mulder2016-10-102-36/+33
|
* Remove duplication of console reportersFelix Mulder2016-10-102-56/+63
|
* Add modifiers to highlightingFelix Mulder2016-10-102-30/+30
|
* Merge pull request #1492 from dotty-staging/add-inlineGuillaume Martres2016-10-0620-5/+456
|\ | | | | Implement inline
| * Add InlineBytecodeTests to check that inline really worksGuillaume Martres2016-10-051-7/+0
| |
| * Add test caseMartin Odersky2016-10-051-0/+7
| |
| * Address @smarter's review commentsMartin Odersky2016-10-021-2/+1
| |
| * Add check fileMartin Odersky2016-10-021-0/+137
| |
| * Handle inlining in inlining argumentsMartin Odersky2016-10-021-4/+8
| | | | | | | | | | | | | | | | We got unbound symbols before because a TreeTypeMap would copy a tree of an inline DefDef but would not adapt the inline body stored in the @inline annotation of the DefDef to point to the updated tree.
| * Inline function parametersMartin Odersky2016-10-021-1/+5
| | | | | | | | | | | | Add inline function parameters. The previous concept of inlineable closure is adapted to coincide with an inline function parameter.
| * Generalize checkInlineConformant to functionsMartin Odersky2016-10-021-0/+44
| | | | | | | | | | | | | | | | Pure expressions with function types now are considered conforming. Necessitated a change in TreeInfo to accept closures as pure expressions. Test case in inlineForeach
| * Don't drop inline closure bindings that are referred in the bodyMartin Odersky2016-10-021-0/+4
| | | | | | | | | | The body might still refer to an inline closure argument without fully applying it. In that case the binding may not be dropped.
| * Always use implicit context at the current periodMartin Odersky2016-10-021-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An implicit method might be unpickled in one run and the implicit body might be selected first in a subsequent run. In that case the inlined code was read with the original context, but that context needs to run at the current period. This resulted in denotation out of date errors in bringForward. Another problem with this design was space leaks: An context might survive multiple runs as part of an ImplicitInfo of an unpickled method. The new design avoids both problems. Implicit contexts are always up to date and leaks are avoided.
| * Add inline for valsMartin Odersky2016-10-021-0/+24
| | | | | | | | | | | | | | | | | | | | - allow inline as an alternative to final for vals (final is retained for backwards compatibility for now) - allow inline for parameters - check that rhs of inline value has a constant type - check that arguments to inline value parameters have constant type - check that inline members are not deferred - make inline members effectively final
| * Add accessibility check for type of newMartin Odersky2016-10-021-1/+0
| |
| * Fix problem related to accessor generation under separate compilationMartin Odersky2016-10-023-5/+21
| | | | | | | | | | | | | | Accessors were multiply generated under separate compilation. To fix this, the resident body of an inlined function is now the same as the inlined body. Both use accessors where necessary. Previously, only the inlined body used accessors.
| * Make inline a keywordMartin Odersky2016-10-027-50/+22
| | | | | | | | | | | | | | `inline` is now a modifier keyword. To keep disruption tolerable, we still allow `@inline` as an annotation as well. Other uses of `inline` are supported only under `-language:Scala2` and are rewritten to identifiers in backticks.
| * More inline testsMartin Odersky2016-10-023-0/+84
| |
| * Make inline annotation @scala.inline.Martin Odersky2016-10-026-26/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop @dotty.annotation.inline. This will inline all @inline marked methods in Scala for which a body is known (i.e. that are either compiled in the same run or have Tasty trees available). Option -Yno-inline suppresses inlining. This is needed for the moment because some @inline methods access private members or members that are otherwise inaccessible at the call-site. Also fixes some problems in Inliner - make sure type arguments to inline calls re fully defined - don't forget recursive calls in typeMap - don't forget positions in treeMap - drop dead code dealing with outer.
| * Test case for closure inliningMartin Odersky2016-10-021-0/+18
| | | | | | | | | | This test works, but closures are not currently inlined. That's a still to do.
| * Update check fileMartin Odersky2016-10-021-0/+5
| |
| * Add test for pattern matching against outerMartin Odersky2016-10-022-0/+20
| |
| * Handle outer this in InlinerMartin Odersky2016-10-022-2/+6
| | | | | | | | Also, do some refactorings and fix some bugs in Inliner.
| * Remove redundanr testMartin Odersky2016-10-021-17/+0
| | | | | | | | Same test with separate compilation is in inlinePower
| * Neg test demonstrating inline positions under cross-compilationMartin Odersky2016-10-022-0/+15
| |
| * Add check filesMartin Odersky2016-10-022-0/+6
| |
| * Support separate compilationMartin Odersky2016-10-024-15/+42
| | | | | | | | | | Inline trees can now be read form TASTY. However, positions are not set correctly. This remains to be implemented.
| * Recursive inlining testsMartin Odersky2016-10-022-0/+32
| | | | | | | | | | pos/power inlines with alomst no extraneous boilerplate. neg/power gives an error that maximal numbers of inlines was exceeded.
| * Add Inlined tree nodeMartin Odersky2016-10-021-2/+4
| | | | | | | | | | | | | | | | | | ... to tag inlined calls. Perform typings and transformations of inlined calls in a context that refers to the INlined node in its InlinedCall property. The idea is that we can use this to issue better error positions. This remains to be implemented.
| * First version of inline schemeMartin Odersky2016-10-022-0/+68
| | | | | | | | | | To be done: outer accessors To be done: error positions
* | Merge pull request #1494 from martijnhoekstra/wintestsFelix Mulder2016-10-0630-0/+8
|\ \ | |/ |/| [WIP] fix encoding issues
| * honor -encoding compiler flag and defaultsMartijn Hoekstra2016-09-0730-0/+8
| | | | | | | | | | | | | | | | | | rename test/pos/valueclasses to pos_valueclasses tests/pos/valueclasses generates a valueclasses.flags file in /tests/partest-generated/pos that conflicts with the valueClasses.flags file that tests/neg/valueClasses.scala tries to create
* | 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
| | | |