summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* Fix SI-6932 by enabling linearization of callback execution for the ↵Viktor Klang2013-01-221-0/+7
| | | | internal execution context of Future
* Merge pull request #1770 from JamesIry/SI-6536_2.9.xAdriaan Moors2012-12-132-0/+324
|\ | | | | SI-6536 Generates super accessors X.super[Y].blah when Y is a class
| * SI-6536 Generates super accessors X.super[Y].blah when Y is a classJames Iry2012-12-132-0/+324
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The main change here is to add another case for generating super accessors - the case in X.super[Y].blah when X isn't the current class and Y is a class. The change is deliberately kept as minimal as possible to reduce the chance of breaking something in the 2.9.x line. Additionally GenICode now detects the case when we're trying to emit byte code that would be nonsense and warns about it. That can safely be made an assert for 2.11. Finally a related assert in RefChecks is beefed up to output a bit more useful information.
* | SIP-14 backport to 2.9.xphaller2012-12-126-0/+2047
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Other than adding the new APIs, a few changes are required: 1. Build. The Java sources in "scala/concurrent/impl" need forkjoin.jar on the classpath. Thus, I replaced the "classpath" attribute in the respective `javac` ant tasks (locker.lib, quick.lib, and strap.lib) with a "classpathref" attribute pointing to a classpath which includes also the forkjoin.jar. In the locker.lib target, exclude the duration package and everything that depends on it. In the docs.lib target, enable dependent method types, since they're used in the `scala.concurrent.duration` package. Also, the library is built with -Ydependent-method-types (for both quick & strap -- use consistent options for stability) 2. Dependent method types and SI-5958. The `duration` package relies on dependent method types, and requires a backport of SI-5958.
* | SI-5958 This deserves a stable type - backport to 2.9.xAdriaan Moors2012-12-102-0/+16
|/ | | | | | | | | `this` (or the self variable) passed as an actual argument to a method should receive a singleton type when computing the method's resultType this is necessary if the method's type depends on that argument adapts the test so that it runs on 2.9.x
* Merge pull request #1560 from phaller/backport/cps-issue-1681Adriaan Moors2012-11-0516-0/+230
|\ | | | | Backport of #994 (SI-5314 - CPS transform of return statement fails)
| * Simplify the adaptation of types of return expressionsphaller2012-11-024-0/+33
| | | | | | | | | | | | | | | | | | | | Add `adaptTypeOfReturn` hook to `AnnotationCheckers`. Move adaptation of types of return expressions from `addAnnotations` to `typedReturn` via `adaptTypeOfReturn` hook. This resolves an inconsistency where previously types could have a plus marker without additional CPS annotations. This also adds additional test cases.
| * Revert "Add missing cases in tail return transform"phaller2012-11-022-15/+0
| | | | | | | | This reverts commit 8d020fab9758ced93eb18fa51c906b95ec104aed.
| * Add missing cases in tail return transformphaller2012-11-022-0/+15
| | | | | | | | | | Disabled warnings that no longer apply because of tail returns. Add several test cases.
| * Replace CheckCPSMethodTraverser with additional parameter on transformer methodsphaller2012-11-021-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-11-0214-0/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | SI-6384 - avoid crash due to optimization in 2.10 CPS pluginphaller2012-10-302-0/+31
|/ | | | | | | This fixes a regression in the 2.9.x branch (code combining CPS and try-catch crashing the compiler). The fix is simply undoing an optimization that was done in the 2.10 CPS plugin (replacing a function with only a match by a match on an empty tree).
* Fix for SI-6245 with workaround for SI-2296.amin2012-09-1711-4/+27
| | | | | | | | | | | | | protected/super accessor issue: Don't subvert the creation of the standard protected accessor with the java interop accessor. For SI-2296, the compiler emits an error instead of causing an illegal access error at runtime. Adapted from e498fac7fdbda3187a2a4fffcdf7fa4f9ddb7ac8. Conflicts: src/compiler/scala/tools/nsc/typechecker/SuperAccessors.scala
* Allow nested calls to `askForResponse` in the presentation compiler.Iulian Dragos2012-09-052-0/+24
| | | | | Fix #6312. review by @odersky,@lrytz.(cherry picked from commit 4f932df552fd2a9e1af31bc3b5fbbfeeaa15feed)
* Merge pull request #1181 from Blaisorblade/topic/2.9.x-stream-const-spaceJosh Suereth2012-08-231-0/+44
|\ | | | | Backport "Make Stream.withFilter.{map,flatMap} run in constant stack space" against 2.9.x
| * Also check that Stream.toSeq gives the right result.Paolo Giarrusso2012-08-221-1/+3
| |
| * Improve test for Stream.withFilter.{map,flatMap}Paolo Giarrusso2012-08-221-10/+40
| | | | | | | | Test a wider range of functionality.
| * Cleanup testcasePaolo Giarrusso2012-08-222-6/+2
| | | | | | | | | | No need to check the output - checking programmatically that the produced streams are empty is enough.
| * Make Stream.withFilter.{map,flatMap} run in constant stack spacePaolo Giarrusso2012-08-222-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The included test currently fails because `map` and `flatMap` do not run in constant stack space on a stream returned by `Stream.withFilter`, as I reported here: https://groups.google.com/d/msg/scala-language/WqJR38REXnk/saaSiDdmyqoJ Fix the problem and add a simple testcase. Note that the stack space consumed when producing an element of this stream is proportional to the number of elements failing the test before the next success. The stack space consumed to produce the stream itself is the space needed to produce the first element, that is, is proportional to the number of failures before the first success.
* | Merge pull request #806 from ↵Adriaan Moors2012-07-031-0/+47
|\ \ | | | | | | | | | | | | Blaisorblade/topic/backport-exponential-specialization-fix [Backport] Fix for exponential compile time in specialization.
| * | Fix for exponential compile time in specialization.Paul Phillips2012-07-021-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | Backport fix to 2.9.2, from commit 39f01d4f48e59c2037a3af759eb6d55d0da50e70 on paulp/scala. Review by @prokopec. Conflicts: src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
* | | Revert "Merge pull request #749 from phaller/backport/cps-ticket-1681"phaller2012-06-278-134/+0
| | | | | | | | | | | | | | | This reverts commit 0132464e7094b158731e950ee6998515871baf60, reversing changes made to 764bd8ec4d8f12764082b1c52e0c2b859c550c0b.
* | | Backport of fix for CPS ticket 1681phaller2012-06-198-0/+134
| | |
* | | Overcame trait/protected/java limitation.Paul Phillips2012-06-016-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | I think this fixes SI-2296, the inability to access java protected members from a trait which extends a java class. Counterexamples appreciated. Closes SI-2296. Review by @dragos. cherry-picked and adapted from f708b87e55.
* | | CPS: test case for ticket 1684phaller2012-05-242-0/+55
| | |
* | | Backport of the 2.10 continuations plugin to 2.9phaller2012-05-242-0/+0
| |/ |/| | | | | | | | | | | | | This commit backports various utility methods from the 2.10 compiler/reflection library to the 2.9 continuations plugin. They are added to the corresponding types in 2.9 using extension methods. Disable test continuations-neg/infer0
* | Helping Proxy equal itself.Paul Phillips2012-04-182-0/+10
|/ | | | Fix for bumpy proxy equals. Closes SI-4807, no review.
* Document regex replacement strings behavior.Daniel C. Sobral2012-03-262-0/+8
| | | | | | | | | All replacement methods use dolar signs to identify groups in the matched string, and backslashes to escape characters. Document this behavior, and provide a method that can be used to properly quote replacement strings when this behavior is not desired. Closes SI-4750.
* Fixes #4895.Aleksandar Pokopec2012-03-211-0/+20
| | | | | | The size map size computation for parallel hash sets was invalid. No review.
* Fix for a bug in CharArrayReader which made tri...Paul Phillips2012-03-142-0/+31
| | | | | | | | | Fix for a bug in CharArrayReader which made triple quoted strings fail to parse sometimes. Note: when the temptation strikes to adjust for special cases by letting the regular case happen and subsequently attempting to fix the ball of mutation by selectively applying what seems like the inverse operation, please consider the possibility that this is not the optimal approach. Closes SI-4785, no review.
* Merge pull request #253 from rjmac/backport/4835Josh Suereth2012-03-142-0/+45
|\ | | | | Backport/4835
| * Add test case for SI-4835 (https://issues.scala-lang.org/browse/SI-4835)Kota Mizushima2012-03-022-0/+45
| | | | | | | | | | | | This test case only confirm that StreamIterator's lazyiness is not broken. Test case about memory consumption could be created. However, such a test cause a greatly increased time of test.
* | Fix for checkfile difference.Paul Phillips2012-03-081-1/+2
| |
* | Revert attempt to limit private types in lubs.Paul Phillips2012-03-083-0/+83
| | | | | | | | | | | | | | | | | | | | Has to be somewhere more directly tied to structural refinements. See run/lub-visibility.scala before/after output for motivation. Closes SI-5534. Conflicts: src/compiler/scala/tools/nsc/symtab/Types.scala
| |
| \
*-. \ Merge remote-tracking branches ↵Paul Phillips2012-03-051-0/+6
|\ \ \ | | |/ | |/| | | | 'szabolcsberecz/backports/fix-specialized-tests' and 'szabolcsberecz/backports/SI-5380' into develop-2.9.x
| | * Fixes SI-5380: non-local return of try expressionSzabolcs Berecz2012-03-031-0/+6
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry picked from commit 02e260a8e67e2b2b6f876aafe76cd61248a89374) Conflicts: src/compiler/scala/tools/nsc/transform/UnCurry.scala Lift only *non-local* returns of try expressions. (cherry picked from commit edf3ae0b8c3688b5cacbe2f7e2ae826f5fbb7644) Conflicts: src/compiler/scala/tools/nsc/transform/UnCurry.scala
* / Fix for cps regression. Closes 5538. Closes 5445.Tiark Rompf2012-03-034-0/+60
|/ | | | (cherry picked from commit 9f5767dd31395cac0bc64c86c2cacf247b1924fa)
* Fixes NPE using iterator with an XML attribute ...Paul Phillips2012-03-012-0/+20
| | | | | | | | Fixes NPE using iterator with an XML attribute being null or None ) (SI-5052 Also fixes incorrect size method (SI-5115 ) Contributed by Jordi Salvat i Alabart. Closes SI-5052, SI-5115, no review.
* slight improvement to lubList so that the simpl...Adriaan Moors2012-02-241-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | slight improvement to lubList so that the simple case of lubbing type constructors works. review by extempore the strategy is to detect when the ts in lub(ts) are actually type constructors and remember their type parameters the BTS of a type constructor is a list of proper types (the type constructors have been applied to their dummy arguments, which are simply type refs to the original type parameters) in lubList, we undo this damage by stripping these dummy arguments (they refer to type parameters that are meant to be bound) a better fix would be to actually bind those type parameters that appear free in error, but that would require major changes to the BTS infrastructure example that only kindasorta works now... given: trait Container[+T] trait Template[+CC[X] <: Container[X]] class C1[T] extends Template[Container] with Container[T] C1's BTS contains Template[Container] with Container[T], but that should really be [T] => Template[Container] with Container[T] instead of wrapping it in a polytype, the current approach uses elimHOTparams to patch up this type so that it looks more like a type ctor: Template[Container] with Container, but this is ill-kinded as Template[Container] is a proper type, whereas Container is not the performance impact should be minimal, but caveat reviewer
* Fix various InnerClasses bugs.Grzegorz Kossakowski2012-02-221-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes two major problems: 1. InnerClasses table missed entries that would close the chain between nested and top-level class. 2. In some situations, classes corresponding to objects would be not be reported in the InnerClasses table. For details it's the best to check SI-4819, SI-4820 and SI-4983. First problem mentioned above was straightforward to fix so I won't be going into details. The second one deserves more attention. From now, classes corresponding to objects are properly reported as inner classes. Also, members (classes, objects) of objects are reported as inner classes of classes corresponding to objects. There's one caveat though: top level objects get two classes (regular and mirror). Members of top-level objects are declared as inner classes of *mirror* class and not regular one. The reason for that is to allow importing them from Java. For example: object A { class B } will be compiled into following classes: A, A$, A$B. If we declared A$B as inner class of A$ (regular class for objects) then it would be impossible to import B using "import A.B" or "import A$.B" constructs. The reason for that is that Java compiler seems to blindly put dollars instead of looking at InnerClasses attribute. Since non-top-level objects don't have a mirror class it's impossible to use the same solution. Thus, in case like this: object A { object B { class C } } it's impossible to import C from Java. That's the tradeoff for fixing other (more serious) problems. It's never been possible to do that in a clean way so we are not making situation worse. As a nice consequence of this change, we get better way to refer to inner members of top-level objects. It's been reflected in one of test-cases that is updated by this change. Fixes SI-4789 SI-4819 SI-4820 SI-4983 and possibly some other tickets related to reflection. Review by extempore, dragos. Conflicts: src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala test/files/pos/javaReadsSigs/fromjava.java
* improve cps handling of if-then-else. no review.Tiark Rompf2012-02-224-0/+69
| | | | | | | | (cherry picked from commit 91dbfb2a8f466cf30f7b02cbc6f3e89376d31c59) Conflicts: src/continuations/plugin/scala/tools/selectivecps/SelectiveANFTransform.scala
* fixes SI-5506. better cps type propagation for polymorphic and ↵Tiark Rompf2012-02-212-0/+65
| | | | | | | | multi-argument list methods. Conflicts: src/continuations/plugin/scala/tools/selectivecps/CPSAnnotationChecker.scala
* Merge remote-tracking branch 'dcsobral/migrationAnnot' into 2.9.x-developPaul Phillips2012-01-221-2/+2
|\
| * Migration message and version cleanupSimon Ochsenreither2012-01-181-2/+2
| | | | | | | | | | | | | | | | | | | | The @migration annotation can now be used like @deprecation. Old syntax is still supported, but deprecated. Improve wording and consistency of migration messages, migration warnings also print the version in which the change occurred now. Partially fixes SI-4990.
* | Checkfile update.Paul Phillips2012-01-221-3/+3
| |
* | Disambiguate some type printing.Paul Phillips2012-01-223-1/+32
| | | | | | | | | | | | | | | | Functions of functions use parens for grouping. Conflicts: src/compiler/scala/tools/nsc/symtab/Types.scala
* | Fix for error printing regression.Paul Phillips2012-01-222-0/+10
|/ | | | | | | | | One's devotion to aesthetics must not be allowed to trump one's commitment to clearly delineated tuplehood. Closes SI-5067, no review. Conflicts: src/compiler/scala/tools/nsc/symtab/Types.scala
* Merge remote-tracking branch 'dcsobral/docImport' into 2.9.x-developPaul Phillips2012-01-161-1/+1
|\
| * Fix documentation typo.Blair Zajac2012-01-111-1/+1
| |
* | Fixes SI-4507.Kato Kazuyoshi2012-01-112-0/+27
| |