summaryrefslogtreecommitdiff
path: root/src/library
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | SI-7680 Update the ScalaDoc entry page of the Scala librarySimon Ochsenreither2013-12-192-16/+49
| | |_|/ / | |/| | |
* | | | | Merge pull request #3335 from swartzrock/masterIchoran2014-01-124-45/+42
|\ \ \ \ \ | | | | | | | | | | | | Fixes #3330 with Scaladoc changes only
| * | | | | Fixes #3330 with Scaladoc changes onlyJason Swartz2014-01-074-45/+42
| | |_|/ / | |/| | |
* | | | | Merge pull request #3124 from DarkDimius/fix-7443Adriaan Moors2014-01-092-6/+48
|\ \ \ \ \ | | | | | | | | | | | | Fix SI-7443 Range.sum ignoring Numeric argument and always assuming default 'plus' implementation
| * | | | | SI-7443 Use typeclass instance for {Range,NumericRange}.sumDmitry Petrashko2013-12-292-6/+48
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously both Range and NumeriRange used formula for sum of elements of arithmetic series and thus always assumed that provided Numeric is regular one. Bug is now fixed by conservatively checking if Numeric is one of default ones and the formula still holds.
* | | | | Merge pull request #3347 from retronym/topic/abs-part-fun-manual-spec-no-moreGrzegorz Kossakowski2014-01-091-12/+0
|\ \ \ \ \ | | | | | | | | | | | | Remove temporary binary compat scaffolding from AbstractPartiionFun.
| * | | | | Remove temporary binary compat scaffolding from AbstractPartiionFun.Jason Zaugg2014-01-091-12/+0
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | These were only needed during the transition period when we removed specialization on AnyRef from `AbstractPartialFunction`. It's time to cast away the crutches.
* | | | | Merge pull request #3336 from OlivierBlanvillain/patch-1Jason Zaugg2014-01-091-1/+1
|\ \ \ \ \ | | | | | | | | | | | | Fix typo in documentation
| * | | | | Fix typo in documentationOlivier Blanvillain2014-01-081-1/+1
| |/ / / /
* | | | | Merge pull request #3338 from gourlaysama/t7491Jason Zaugg2014-01-091-6/+6
|\ \ \ \ \ | | | | | | | | | | | | SI-7491 fix typo in scala.App documentation
| * | | | | SI-7491 deprecate overriding App.main and clarify documentationAntoine Gourlay2014-01-081-6/+6
| |/ / / / | | | | | | | | | | | | | | | App.main should never be overridden, so let's enforce it.
* / / / / SI-7859 fix AnyVal.scala scaladoc.xuwei-k2014-01-091-1/+1
|/ / / / | | | | | | | | | | | | Value class member need not be public in 2.11+
* | | | Merge pull request #3289 from soc/SI-7492-reduxJason Zaugg2014-01-081-4/+4
|\ \ \ \ | | | | | | | | | | SI-7492 Make scala.runtime.MethodCache private[scala]
| * | | | SI-7492 Make scala.runtime.MethodCache private[scala]Simon Ochsenreither2013-12-191-4/+4
| |/ / / | | | | | | | | | | | | | | | | These are internal implementation details which shouldn't be exposed to users (and might go away when support for invokedynamic is added).
* | | | Merge pull request #3325 from clhodapp/fix/double.absJason Zaugg2014-01-081-0/+4
|\ \ \ \ | | | | | | | | | | Fix (postfix abs for -0.0)
| * | | | SI-8102 -0.0.abs must equal 0.0clhodapp2014-01-061-0/+4
| | |/ / | |/| | | | | | | | | | | | | | | | | | SI-8102 points out that -0.0.abs returns -0.0 (in error). The same issue exists for -0.0f. This commit fixes the issue for both by delegating to math.abs.
* | | | Merge pull request #3301 from Ichoran/issue/7837Jason Zaugg2014-01-081-2/+2
|\ \ \ \ | |/ / / |/| | | Resolves SI-7837, failure in quickSort.
| * | | SI-7837 quickSort, along with Ordering[K], may result in stackoverflow ↵Rex Kerr2013-12-311-2/+2
| | |/ | |/| | | | | | | | | | | | | | | | | | | because the code uses '==' instead of 'equiv' == instead of equiv (from Ordering) was used by mistake. Fixed. Also created a test to make sure that == is not used by throwing an exception if it is (as suggested by Jason).
* | | Merge pull request #3313 from OlivierBlanvillain/upstreamJason Zaugg2014-01-034-4/+4
|\ \ \ | | | | | | | | Fix typos in documentation
| * | | Fix typos in documentationOlivier Blanvillain2013-12-284-4/+4
| | |/ | |/|
* | | Merge pull request #3284 from soc/SI-7880Jason Zaugg2014-01-031-9/+13
|\ \ \ | | | | | | | | SI-7880 Fix infinite loop in ResizableArray#ensureSize
| * | | SI-7880 Fix infinite loop in ResizableArray#ensureSizeSimon Ochsenreither2013-12-231-9/+13
| |/ / | | | | | | | | | | | | | | | This issue was triggered for values greater than Int.MaxValue/2, which caused the computation of the new array size to overflow and become negative, leading to an infinite loop.
* | | Merge pull request #3299 from xuwei-k/stream-flatten-exampleJason Zaugg2014-01-031-1/+1
|\ \ \ | |_|/ |/| | fix Stream#flatten example
| * | fix Stream#flatten examplexuwei-k2013-12-231-1/+1
| |/
* / Remove commented out code from HashSet and HashMapRüdiger Klaehn2013-12-272-71/+2
|/ | | | | | Remove an ancient, commented out microbenchmark from HashSet and HashMap. Also, fix indentation for while loop in HashSet.foreach and remove some other commented out code that no longer serves any purpose.
* Merge pull request #3266 from soc/SI-7546Adriaan Moors2013-12-131-6/+10
|\ | | | | SI-7546 Use likely monotonic clock source for durations
| * SI-7546 Use likely monotonic clock source for durationsSimon Ochsenreither2013-12-131-6/+10
| | | | | | | | | | | | | | | | | | | | System.currentTimeMillis is affected by wall-clock time, which means things can appear to jump back in time. Use System.nanoTime which is more likely¹ to be monotonic instead. ¹ See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6458294 "nanoTime affected by system clock change on Linux (RH9) or in general lacks monotonicity".
* | Merge pull request #3233 from scottcarey/SI-8042Adriaan Moors2013-12-131-24/+34
|\ \ | | | | | | Use Serialization Proxy Pattern in List
| * | SI-8042 Use Serialization Proxy Pattern in ListScott Carey2013-12-121-24/+34
| |/ | | | | | | | | | | | | | | | | | | | | Modify List to use the Serialization Proxy Pattern instead of directly mutating its state during deserialization. Use the proxy at the List level for both Nil and :: for simplicity. Change one member variable (hd) to val from var as a result. The other member variable (tl) cannot yet be changed to val because it is mutated by ListBuffer in the library and Types in reflection.
* | Merge pull request #3250 from soc/SI-8059Adriaan Moors2013-12-131-1/+11
|\ \ | | | | | | SI-8059 Override immutable.Queue#{+:,:+} for performance
| * | SI-8059 Override immutable.Queue#{+:,:+} for performanceSimon Ochsenreither2013-12-111-1/+11
| |/ | | | | | | Without those overrides, all elements are unnecessarily copied.
* | Merge commit '9cdbe28' into merge/2.10.x-to-masterJason Zaugg2013-12-111-2/+8
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: build.examples.xml build.xml docs/examples/actors/pingpong.scala docs/examples/fors.scala docs/examples/iterators.scala docs/examples/jolib/Ref.scala docs/examples/jolib/parallelOr.scala docs/examples/monads/callccInterpreter.scala docs/examples/monads/directInterpreter.scala docs/examples/monads/errorInterpreter.scala docs/examples/monads/simpleInterpreter.scala docs/examples/monads/stateInterpreter.scala docs/examples/parsing/ArithmeticParser.scala docs/examples/patterns.scala docs/examples/pilib/elasticBuffer.scala docs/examples/pilib/handover.scala docs/examples/pilib/piNat.scala docs/examples/typeinf.scala src/build/pack.xml
| * SI-7912 Be defensive calling `toString` in `MatchError#getMessage`Jason Zaugg2013-12-101-2/+8
| | | | | | | | | | Otherwise, objects with exception-throwing `toString` lead to a cascading error far removed from the originally failed match.
* | Merge pull request #3226 from ziggystar/patch-1Adriaan Moors2013-12-081-0/+7
|\ \ | | | | | | add method dequeueOption to immutable.Queue
| * | add method dequeueOption to immutable.QueueThomas Geier2013-12-051-0/+7
| | | | | | | | | | | | | | | | | | This allows immutable.Queue to be used conveniently in functional code. Method is in the spirit of `headOption` on seqs or `get` on maps. Also adds a unit test for immutable.Queue.
* | | Merge pull request #3228 from retronym/merge/2.10.x-and-pr-3209-to-masterJason Zaugg2013-12-061-1/+4
|\ \ \ | | | | | | | | Merge #3209 and 2.10.x to master
| * \ \ Merge commit '7d74884' into merge-2.10.x-to-masterJason Zaugg2013-12-061-1/+4
| |\ \ \ | | | |/ | | |/| | | | | | | | | Conflicts: test/files/jvm/scala-concurrent-tck.scala
| | * | SI-6913 Fixing semantics of Future fallbackTo to be according to docsHeather Miller2013-12-051-1/+4
| | | | | | | | | | | | | | | | Origin: viktorklang@1bbe854
* | | | Merge pull request #3191 from retronym/ticket/deprecate-par-viewJason Zaugg2013-12-0618-961/+277
|\ \ \ \ | |_|_|/ |/| | | Remove parallel collection views and, with them, Gen*View
| * | | Removes Gen*View and Par*ViewJason Zaugg2013-11-2618-973/+277
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - code that used to be inherited in *View is now inlined - the `view` methods on `ParIteratoa` and `ParSeq` now convert to sequential collections, and are deprecated asking the user to do this explicitly in the future. Should be largely source compatible with 2.10.x, on the assumption that the removed classes, while being public, were internal implementation details. A few tests used now-removed classes to demonstrate compiler crashes. I managed to confirm that after my decoupling, t4365 still exercises the bug: % qbin/scalac test/files/pos/t4365/*.scala warning: there were 2 deprecation warning(s); re-run with -deprecation for details one warning found % scalac-hash 7b4e450 test/files/pos/t4365/*.scala warning: there were 2 deprecation warning(s); re-run with -deprecation for details one warning found % scalac-hash 7b4e450~1 test/files/pos/t4365/*.scala 2<&1 | grep -i wrong error: something is wrong: cannot make sense of type application something is wrong: cannot make sense of type application something is wrong: cannot make sense of type application I didn't manage to do the same for specializes-sym-crash.scala, and instead just made it compile.
| * | | Deprecates Par*View and Gen*ViewJason Zaugg2013-11-2412-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 2.12, this gives us the option to move the code from Gen*View down into *View. If we don't do something more drastic with views, which inertia and history suggests is a real possibility, we can at least shed a little of the implementation. These abstractions are *only* used to share implementation; there is no `view` method available on, for instance, `GenSeq` that lets one abstract over parallel/sequential collections while spawning views. scala> (List(1): collection.GenSeq[Int]).view <console>:8: error: value view is not a member of scala.collection.GenSeq[Int] (List(1): collection.GenSeq[Int]).view ^ Let's keep it that way. I suspect that views over parallel collections exist not because they were the most sought after feature, but rather because the initial incarnatin of parallel collections used to live undernead TraversableOnce, and hence were obligated to implement `def view`. This change will give us deprecation warnings in the non deprecated places that extend `Gen*View` (three, by my count) in the interim. There are ways to avoid this, but they aren't particularly appealing.
* | | | Merge pull request #3213 from Ichoran/issue/8014Adriaan Moors2013-12-031-1/+1
|\ \ \ \ | | | | | | | | | | Fixes SI-8014, regression in Vector ++ TraversableOnce.
| * | | | Fixes SI-8014, regression in Vector ++ TraversableOnce.Rex Kerr2013-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Now uses the cached copy instead of the exhausted iterator. Adds a JUnit test for ++.
* | | | | SI-7373 Make the constructor of Vector non-publicJason Zaugg2013-12-031-1/+1
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The danger of: new Vector(1, 2, 3).toString java.lang.NullPointerException and the "should have been private all along" argument call for a break in the source compatibility policy here.
* | / / SI-8022 Backwards compatibility for Regex#unapplySeqJason Zaugg2013-12-011-6/+6
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The change in ce1bbfe / SI-6406 introduced overloads of `unapplySeq` with wider static and dynmaic result types than the now-deprecated alternative that accepted `Any`. This is subtly source incompatible and the change was noticed in Specs2. This commit uses `List` as the static and runtime type for the new overloads. For consistency, the same is done for the new method added in SI-7737 / 93e9623.
* | | SI-4332 Plugs the gaps in viewsJason Zaugg2013-11-264-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These currently result in runtime errors: scala> List(1).view.distinct.force java.lang.UnsupportedOperationException: SeqView(...).newBuilder scala> List(1).view.inits.toList java.lang.UnsupportedOperationException: SeqView(...).newBuilder Two tests are enclosed: 1. reflect on the views to make any method that returns `Repr` is overriden in `*ViewLike`. This guards against new additions to the collections API. 2. exercise the newly added overrides Some care is needed with `tail`, we must re-override it in `mutable.IndexedSeqView` to be explicit about the end point of the slice, because the `IndexedSeqView#Sliced` defines length in terms of that. (Higher up the chain, it is just `iterator.size`, that's why `SeqView#tail` just sets up a slice from `1 to Int.MaxValue`.) Parallel collections views are not touched, as these are likely to be deprecated or removed shortly. Before this change, the test reported the following. Not all of these methods were buggy. For instance, `sortBy`, `sortWith` are implemented in terms of `sorted` which was implemented in `SeqViewLike`. Even in those cases, I have opted to override the methods in the `ViewLike` to guard against changes in the base class implementation and to simplify the rules in the test. ====================================================================== Checking scala.collection.TraversableView ====================================================================== trait TraversableLike ---------------------------------------------------------------------- def filterNot(p: A => Boolean): Repr def inits: Iterator[Repr] def tails: Iterator[Repr] override def tail: Repr ====================================================================== Checking scala.collection.IterableView ====================================================================== trait IterableLike ---------------------------------------------------------------------- def dropRight(n: Int): Repr def sliding(size: Int): Iterator[Repr] def takeRight(n: Int): Repr trait TraversableLike ---------------------------------------------------------------------- def filterNot(p: A => Boolean): Repr def inits: Iterator[Repr] def tails: Iterator[Repr] override def tail: Repr ====================================================================== Checking scala.collection.SeqView ====================================================================== trait IterableLike ---------------------------------------------------------------------- def dropRight(n: Int): Repr def sliding(size: Int): Iterator[Repr] def takeRight(n: Int): Repr trait SeqLike ---------------------------------------------------------------------- def combinations(n: Int): Iterator[Repr] def distinct: Repr def permutations: Iterator[Repr] def sortBy[B](f: A => B)(implicit ord: scala.math.Ordering[B]): Repr def sortWith(lt: (A, A) => Boolean): Repr trait TraversableLike ---------------------------------------------------------------------- def filterNot(p: A => Boolean): Repr def inits: Iterator[Repr] def tails: Iterator[Repr] override def tail: Repr ====================================================================== Checking scala.collection.mutable.IndexedSeqView ====================================================================== trait IndexedSeqOptimized ---------------------------------------------------------------------- override def dropRight(n: Int): Repr override def tail: Repr override def takeRight(n: Int): Repr trait IterableLike ---------------------------------------------------------------------- def sliding(size: Int): Iterator[Repr] trait SeqLike ---------------------------------------------------------------------- def combinations(n: Int): Iterator[Repr] def distinct: Repr def permutations: Iterator[Repr] def sortBy[B](f: A => B)(implicit ord: scala.math.Ordering[B]): Repr def sortWith(lt: (A, A) => Boolean): Repr trait TraversableLike ---------------------------------------------------------------------- def filterNot(p: A => Boolean): Repr def inits: Iterator[Repr] def tails: Iterator[Repr] ====================================================================== Checking scala.collection.immutable.StreamView ====================================================================== trait IterableLike ---------------------------------------------------------------------- def dropRight(n: Int): Repr def sliding(size: Int): Iterator[Repr] def takeRight(n: Int): Repr trait SeqLike ---------------------------------------------------------------------- def combinations(n: Int): Iterator[Repr] def distinct: Repr def permutations: Iterator[Repr] def sortBy[B](f: A => B)(implicit ord: scala.math.Ordering[B]): Repr def sortWith(lt: (A, A) => Boolean): Repr trait TraversableLike ---------------------------------------------------------------------- def filterNot(p: A => Boolean): Repr def inits: Iterator[Repr] def tails: Iterator[Repr] override def tail: Repr
* | | Merge pull request #3186 from Blaisorblade/patch-1Adriaan Moors2013-11-221-3/+3
|\ \ \ | | | | | | | | Revise paragraph (a revised #3164)
| * | | Revise paragraph (a revised #3164)Paolo G. Giarrusso2013-11-231-3/+3
| |/ / | | | | | | Revise text further, following suggestions in #3164 and part of the suggestions by @som-snytt. But I've kept "appear", since this paragraph documents the external behavior, not the implementation.
* | | SI-7999 s.u.c.NonFatal: StackOverflowError is fatalSimon Ochsenreither2013-11-221-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | As demonstrated in https://groups.google.com/d/topic/scala-language/eC9dqTTBYHg, SOEs should be considered fatal, because all popular JVM implementations seem to run into inconsistent state (ignoring finally blocks leading to not running monitorExit, leading to locks not being unlocked, ...) if one just pushes them enough.
* | | Merge pull request #3156 from JamesIry/remove_deprecated_migration_constructorJason Zaugg2013-11-221-4/+1
|\ \ \ | | | | | | | | Remove deprecated constructor from the migration annotation