summaryrefslogtreecommitdiff
path: root/test/files/continuations-neg
Commit message (Collapse)AuthorAgeFilesLines
* Closes SI-6358. Move accessor generation for lazy vals to typers.Hubert Plociniczak2012-10-181-5/+3
| | | | | | | | | | | | | Until now lazy accessors were handled somehow special because their symbol was created in typers but the corresponding tree was only added in Refchecks. This irregularity caused serious problems for value classes. Also it now looks just better when lazy value is treated in a similar way as other fields. I needed to adapt reifier so that it handles the new implementation correctly. Previously it had to recreate lazy val only by removing defdef and renaming. Now we basically need to recreate lazy val from scratch. There is one minor change to cps plugin but that is still fine because lazy vals were never really part of the transformation. Some range positions needed to be fixed manually. We could do it at the creation time but that would require a lot more "if (symbol.isLazy)" conditions for MethodSyntheis and Symbol/Tree creation and would just unnecessary complicate api. If someone has a better idea, please speak up. Range positions changes were necessary because previously accessors were created at refchecks and they weren't checked by validator (even though they were wrong). This commit removes lazy val implementation restriction introduced for 2.10.0. (cherry-picked from 981424b)
* Replace CheckCPSMethodTraverser with additional parameter on transformer methodsphaller2012-08-081-1/+1
| | | | | | | Other fixes: - remove CPSUtils.allCPSMethods - add clarifying comment about adding a plus marker to a return expression
* SI-5314 - CPS transform of return statement failsphaller2012-08-088-0/+72
| | | | | | | | | | | | | | | | | | | | | | | | | Enable return expressions in CPS code if they are in tail position. Note that tail returns are only removed in methods that do not call `shift` or `reset` (otherwise, an error is reported). Addresses the issues pointed out in a previous pull request: https://github.com/scala/scala/pull/720 - Addresses all issues mentioned here: https://github.com/scala/scala/pull/720#issuecomment-6429705 - Move transformation methods to SelectiveANFTransform.scala: https://github.com/scala/scala/pull/720#commitcomment-1477497 - Do not keep a list of tail returns. Tests: - continuations-neg/t5314-missing-result-type.scala - continuations-neg/t5314-type-error.scala - continuations-neg/t5314-npe.scala - continuations-neg/t5314-return-reset.scala - continuations-run/t5314.scala - continuations-run/t5314-2.scala - continuations-run/t5314-3.scala
* Revert pull request #720 (CPS: enable return expressions in CPS code if they ↵phaller2012-06-272-22/+0
| | | | | | | | | are in tail position) Reverts commit 0ada0706746c9c603bf5bc8a0e6780e5783297cf. Reverts commit 51c92f02229098d0b402a65a72267f7a17984022. Reverts commit cdfbe8e39fbbec00c969cd74f117ae410b98b40b. Reverts commit 796024c7429a03e974a7d8e1dc5c80b84f82467d.
* Merge pull request #752 from retronym/topic/warn-catch-all-4Adriaan Moors2012-06-221-3/+3
|\ | | | | SI-2807 Resurrect and refine the promiscuous catch warning.
| * SI-2807 Resurrect and refine the promiscuous catch warning.Jason Zaugg2012-06-191-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | The previous incarnation didn't survive 4fb3473. This version can be cleared by using a typed pattern: `catch { case _: Throwable => }`. This is motivated by the recent appearance of such a catch in `util.Try`, and by battle scars left by one too many processes bravely but stupidly catching and logging OutOfMemoryErrors. -Y status has been skipped: this warning is enabled by default and can only be silenced with use of a typed pattern.
* | CPS: enable return expressions in CPS code if they are in tail positionphaller2012-06-142-0/+22
|/ | | | | | | | | | | Adds a stack of context trees to AnnotationChecker(s). Here, it is used to enforce that adaptAnnotations will only adapt the annotation of a return expression if the expected type is a CPS type. The remove-tail-return transform is reasonably general, covering cases such as try-catch-finally. Moreover, an error is thrown if, in a CPS method, a return is encountered which is not in a tail position such that it will be removed subsequently.
* Fix for SI-3718.Paul Phillips2012-05-032-0/+7
| | | | | | | And for a bunch of other tickets where we unleash a stack trace rather than printing a sensible error message. But SI-3718 is a continuations plugin crash, now a reasonable if somewhat vague error.
* Fix for continuations issue.Paul Phillips2012-04-052-18/+0
| | | | | | | | Avoid explicit type arguments which don't conform to bounds where they could be successfully inferred. I had to disable one "neg" test which is no longer neg. Can anyone clue me in as to whether it is important?
* Fix for cps regression. Closes 5538. Closes 5445.Tiark Rompf2012-03-022-0/+9
|
* Fixing checkfile.Paul Phillips2012-01-151-1/+1
|
* TypeConstraint/TypeVar refinement.Paul Phillips2012-01-071-1/+1
| | | | | | | | | | | I zeroed in on the actual conditions under which the parameter bounds can be utilized without poisoning the well. Also fixed a bug in ClassfileParser where it would get confused and set Any as a lower bound, as well as a bug or at least misbehavior where a TypeBounds with only Any/Nothing as an upper/lower bound would be treated differently than one with no bound at all. Review by @moors.
* Begone t1737...Hubert Plociniczak2011-11-0211-34/+34
|
* Whitespace fix for continutations tests.Josh Suereth2011-11-231-1/+1
|
* Selective dealiasing when printing errors.Paul Phillips2011-10-032-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *** Important note for busy commit log skimmers *** Symbol method "fullName" has been trying to serve the dual role of "how to print a symbol" and "how to find a class file." It cannot serve both these roles simultaneously, primarily because of package objects but other little things as well. Since in the majority of situations we want the one which corresponds to the idealized scala world, not the grubby bytecode, I went with that for fullName. When you require the path to a class (e.g. you are calling Class.forName) you should use javaClassName. package foo { package object bar { class Bippy } } If sym is Bippy's symbol, then sym.fullName == foo.bar.Bippy sym.javaClassName == foo.bar.package.Bippy *** End important note *** There are many situations where we (until now) forewent revealing everything we knew about a type mismatch. For instance, this isn't very helpful of scalac (at least in those more common cases where you didn't define type X on the previous repl line.) scala> type X = Int defined type alias X scala> def f(x: X): Byte = x <console>:8: error: type mismatch; found : X required: Byte def f(x: X): Byte = x ^ Now it says: found : X (which expands to) Int required: Byte def f(x: X): Byte = x ^ In addition I rearchitected a number of methods involving: - finding a symbol's owner - calculating a symbol's name - determining whether to print a prefix No review.
* Moved test out of pending, closes SI-3628, no r...Paul Phillips2011-07-292-0/+15
| | | | | Moved test out of pending, closes SI-3628, no review.
* I wrote a warning when nullary methods return U...Paul Phillips2011-04-282-4/+4
| | | | | | | | | | | | | | | I wrote a warning when nullary methods return Unit. I wimped out of including it in this patch because we had about 200 of them, and that's what is fixed in this patch. I will add the warning to some kind of "-Xlint" feature after 2.9. This is motivated at least partly by the resolution of #4506, which indicates the distinction between "def foo()" and "def foo" will continue to jab its pointy stick into our eyes, so I believe we have a minimal duty of at least following our own advice about what they mean and not making a semirandom choice as to whether a method has parens or not. Review by community.
* Rolled partest back to r21328.Paul Phillips2010-05-0620-0/+229
| | | | | | | | changes necessary to plug it back in while preserving everything which has happened since then in tests and such, but we should be the lookout for overreversion. Review by phaller (but as a formality, I don't think it requires direct review.)
* If I work on this patch any longer without chec...Paul Phillips2010-04-0520-229/+0
| | | | | | | | | | | | | | | | If I work on this patch any longer without checking in I will go stark raving mad. It is broken up into a couple pieces. This one is the changes to test/. It includes fixing a bunch of tests, removing deprecated constructs, moving jars used by tests to the most specific plausible location rather than having all jars on the classpath of all tests, and some filesystem layout change (continuations get their whole own srcpath.) This would be the world's most tedious review, so let's say no review. [Note: after this commit, I doubt things will build very smoothly until the rest of the partest changes follow. Which should only be seconds, but just in case.]
* closes 2864.Tiark Rompf2010-03-292-0/+22
|
* added support for continuations in try/catch bl...Tiark Rompf2010-03-162-0/+40
| | | | | | added support for continuations in try/catch blocks. review by community.
* fixed treatment of annotated types in isNumeric...Tiark Rompf2010-03-151-4/+4
| | | | | | fixed treatment of annotated types in isNumericSubType. re-enabled test case. review by odersky
* Disabled failing testMartin Odersky2010-03-131-4/+4
|
* moved the continuations plugin into trunk.Tiark Rompf2010-03-1116-0/+167