summaryrefslogtreecommitdiff
path: root/src/library
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #1247 from jsuereth/fix/SI-6114Josh Suereth2012-09-121-0/+7
|\ | | | | Fix t6114 - ++ on JList wrapper modifies underlying collection.
| * Fix t6114 - ++ on JList wrapper modifies underlying collection.Josh Suereth2012-09-111-0/+7
| | | | | | | | | | | | We solve this by overriding clone for JListWrapper to actually do a full clone. Note: This fix may need to be included other places, *but* we're not sure we've cloned the collection sensibly. I.e. is ArrayList a good default?
* | improve Promise.tryAwait by converting to match statementRoland2012-09-121-10/+9
| | | | | | | | | | - also use type FiniteDuration due to a previous change to Deadline’s type signature
* | Merge remote-tracking branch 'origin/2.10.x' into fix-duration-issues-RKRoland2012-09-1216-111/+215
|\ \
| * \ Merge pull request #1279 from rkuhn/fix-duration-usageJosh Suereth2012-09-117-34/+71
| |\ \ | | | | | | | | fix usage of Duration in Promise impl
| | * | improve docs and Promise implRoland2012-09-113-33/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - scaladoc the exceptions thrown by Await.* and Awaitable.* - move intercept[Exception] into partest’s TestUtil object - improve Promise.tryAwait implementation following Viktor’s comments and make use of Deadline to avoid calling System.nanoTime too often
| | * | fix usage of Duration in Promise implRoland2012-09-107-15/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - correctly treat MinusInf and Undefined - don't toMillis in the timeout message (could be MinusInf) - also notice that Inf did not actually wait unbounded - and further notice that tryAwait swallows InterruptedException instead of bailing out early => changed to do so and added throws annotation - also removed some unused imports of Duration
| * | | Merge pull request #1262 from jsuereth/fix/SI-6271Josh Suereth2012-09-111-0/+1
| |\ \ \ | | | | | | | | | | Fixes SI-6271 - Missing isEmpty override for views.
| | * | | Fixes SI-6271 - Missing isEmpty override for views.Josh Suereth2012-09-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GenIterableView didn't override isEmpty for views to look at *filtered* iterator, but was instead pulling unfiltered iterator and causing issues. Chalk up another bizzare bug to lack of insight/visibility into linearization and what havoc overriding new methods can spew on our library.
| * | | | Merge pull request #1284 from retronym/topic/deprecated-inheritanceGrzegorz Kossakowski2012-09-114-0/+45
| |\ \ \ \ | | |_|_|/ | |/| | | SI-6162 Adds private[scala] @deprecatedInheritance/@deprecatedOverriding
| | * | | Pull request feedbackJason Zaugg2012-09-111-1/+1
| | | | |
| | * | | Rescues @deprecated{Inheritance, Overriding}Jason Zaugg2012-09-112-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While they ought to be generalized to aribirary modifier changes before being offered in the standard library, the opportunity to use them in 2.10 is too important to pass up. So for now, they're private[scala]. En route: - made the error messages more concise - fix positioning of inheritance error - improve test coverage
| | * | | Adds @deprecatedInheritance to BigInt and BigDecimalSimon Ochsenreither2012-09-102-0/+2
| | | | |
| | * | | SI-6162 Adds @deprecatedInheritance/@deprecatedOverridingSimon Ochsenreither2012-09-102-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These annotations are meant to warn from inheriting a class or from overriding a member, due to the reasons given in `msg`. The naming and placement of the methods is in line with @deprecated and @deprecatedName.
| * | | | Merge pull request #1269 from jsuereth/wip/si-6333Josh Suereth2012-09-101-23/+40
| |\ \ \ \ | | | | | | | | | | | | Wip/si 6333
| | * | | | Minor code style alterations and performance fixes.Josh Suereth2012-09-071-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifically, avoid reinstantiating an immutable object to alter the type parameter *IF* that type parameter has nothing to do with the contents of the object.
| | * | | | Fix for SI-6333 - Try throws from combinators.Josh Suereth2012-09-071-13/+33
| | | |_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | * Added more comprehensive tests to Try. * Delineated what methods do and don't catch exceptions in docs. * Fixed combinator methods that should catch exceptions.
| * / | | SI-6345 Remove scala.runtime.ScalaRunTime.TrySimon Ochsenreither2012-09-101-29/+0
| |/ / /
| * | | Merge pull request #1265 from scalamacros/ticket/6318Josh Suereth2012-09-061-1/+20
| |\ \ \ | | | | | | | | | | SI-6318 fixes ClassTag.unapply for primitives
| | * | | SI-6318 fixes ClassTag.unapply for primitivesEugene Burmako2012-09-061-1/+20
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ClassTag.unapply now has overloads for primitive value classes so that it can preserve boxiness when performing subtyping tests. First I wanted to annotate ClassTag.unapply with a ClassTag itself, i.e. to transform its signature from "def unapply(x: Any): Option[T]" to "def unapply[U: ClassTag](x: U): Option[T]". But then virtpatmat_typetag.scala exhibited a nasty problem. When pattern matching with this unapply, patmat first infers U as something and then tries to pattern match against this inferred type. And if U gets inferred as an abstract type itself, bad things happen: warning: The outer reference in this type test cannot be checked at run time. That's why I decided to drop the ClassTag idea and go with 9 extra overloads. Not very beautiful, but definitely robust.
| * | | fixes Manifest.Nothing and Manifest.NullEugene Burmako2012-09-062-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also introduces an important change to Manifest.Nothing and Manifest.Null. Previously their `erasure` was equal to classOf[Object]. Now it's correctly set to classOf[scala.runtime.Nothing$] and classOf[scala.runtime.Null$] correspondingly. See a discussion here: https://groups.google.com/forum/#!topic/scala-internals/Y0ALGo7QPqE
| * | | SI-6246 deprecated apis for core class tagsEugene Burmako2012-09-062-23/+32
| |/ / | | | | | | | | | | | | Aliases ClassTag.XXX to Manifest.XXX to reuse already existing implementations of deprecated APIs.
* | | restrict Deadline to finite durations (would have to throw otherwise)Roland2012-09-121-9/+10
| | |
* | | make private methods private[this] to avoid conflicts when importing Duration._Roland2012-09-121-15/+15
| | |
* | | retronym had one more improvement hidden up his sleeve for DurationRoland2012-09-121-7/+9
| | |
* | | factor out more constants in Duration, thanks paulp!Roland2012-09-121-8/+18
| | |
* | | two more minor cleanups to DurationRoland2012-09-111-2/+2
| | | | | | | | | | | | | | | - copy partest TestUtil.intercept change from PR 1279 branch - add comment on non-obvious match cases
* | | fix two minor issues in DurationRoland2012-09-091-15/+14
| | | | | | | | | | | | | | | - make constants for fromNanos(Long) actually inlined constants - clarify origin of require() check constants in FiniteDuration
* | | fix some one more issue in DurationRoland2012-09-071-54/+79
| | | | | | | | | | | | | | | | | | | | | - Inf / Zero == Inf - add some more missing test cases - clarify magic constant - move exception descriptions into proper @throws docs
* | | second round of Duration cleanupRoland2012-09-071-97/+425
| | | | | | | | | | | | | | | | | | | | | | | | - make Duration behave consistent with Double's non-finite semantics - add ScalaDoc - add complete test suite - change overflow protection impl after review comments - clean up code
* | | several fixes to scala.concurrent.util.DurationRoland2012-09-051-9/+58
|/ / | | | | | | | | | | | | | | | | | | | | - add test cases (migrated from Akka sources) - add overflow checking (will throw IllegalArgumentException instead of giving wrong results) - make string parsing more precise when giving >100days in nanoseconds - make method signatures more precise in retaining FiniteDuration throughout calculations - fix mul/div of infinities by negative number - add Ordering for Deadline (was accidentally left out earlier)
* | Removing duplication from Duration.Paul Phillips2012-09-041-328/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I don't know what good it is to have code review if we are checking in code like this. We must raise the bar, people. When the justification for code being in the standard library is borderline at best - as it is here - then the code must be of exceptional quality. This code is not of exceptional quality. Mostly these are not behavioral changes, but: - I removed finite_? as it is a gratuitous deviation from every isXXX method in the world. This isn't ruby. - I removed all the regexps, which only made things complicated - I removed all the unnecessary casts, which is to say, all of them - I made more things final, sealed, and private - The unapply structure was all wrong; returning Option[Duration] on the string unapply meant you'd have to say case Duration(Duration(x, y)) => ... So I fixed apply and unapply to be symmetric. - And I removed the "parse" method, since it was doing what apply is supposed to do. There's a test case to exercise accessing it from java, which also reveals what I hope are bugs. Thanks to viktor klang for DurationConversions.
* | Merge pull request #1219 from odersky/topic/worksheet-instrumenterJosh Suereth2012-09-041-3/+3
|\ \ | | | | | | More worksheet nstrumentation changes
| * | Made instrumenter more robust by looking at tokensMartin Odersky2012-08-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Made instrumenter more robust by taking into account the positions of the tokens in the source. This allows us to reliably put instrumentation code at the end of the previous token, which tends to put it at end of lines. Furthermore, we now skip left parents. Previously, the instrumenter got confused for a statement like ( x + 1 ) because it thought that the statement started at the `x` and not at the `(`. Another small change is that we now use decoded names in the worksheet. So ??? will show as ??? not $qmark$qmark$qmark.
* | | Merge pull request #1244 from dgruntz/2.10.xJosh Suereth2012-09-041-4/+4
|\ \ \ | | | | | | | | Fixes typos in the ScalaDoc of StringContext
| * | | Fixes typos in the ScalaDoc of StringContextDominik Gruntz2012-09-041-4/+4
| | | |
* | | | Fixes SI-6285 - ParIterableLike no longer says sequential foreach.Josh Suereth2012-09-041-1/+1
| |_|/ |/| |
* | | Merge pull request #1192 from jsuereth/deprecate/low-hangingPaul Phillips2012-09-047-0/+7
|\ \ \ | | | | | | | | Deprecate unmaintained/old classes for removal in 2.11
| * | | Deprecate unmaintained/old classes for removal in 2.11Josh Suereth2012-08-247-0/+7
| | | |
* | | | Made Dynamic extend Any.Paul Phillips2012-09-031-5/+5
| | | | | | | | | | | | | | | | So it can be used in value classes.
* | | | Merge pull request #1225 from jsuereth/fix/si-6290Josh Suereth2012-09-012-7/+14
|\ \ \ \ | | | | | | | | | | Fixes SI-6290 by creating real instnaces of language features.
| * | | | Fixes SI-6290 by creating real instnaces of language features.Josh Suereth2012-08-312-7/+14
| | | | |
* | | | | Merge pull request #1213 from paulp/topic/anyvalJosh Suereth2012-08-3022-113/+133
|\ \ \ \ \ | |_|_|_|/ |/| | | | Expanded the reach of value classes.
| * | | | Two more value classes.Paul Phillips2012-08-292-53/+50
| | | | | | | | | | | | | | | | | | | | Tuple2Zipped and Tuple3Zipped.
| * | | | Expanded the reach of value classes.Paul Phillips2012-08-2920-60/+83
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now extending AnyVal: - RichInt, RichDouble, etc. - ArrayOps.ofRef, ofBoolean, etc - StringAdd - StringFormat The rest of it is the changes necessary to enable those.
* | | | Merge pull request #1160 from rklaehn/SI-6220Josh Suereth2012-08-301-10/+29
|\ \ \ \ | | | | | | | | | | Si 6220
| * | | | Improve efficiency of updatedRuediger Klaehn2012-08-181-10/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added utility method to create a HashTrieSet with two leaf HashSets with different hash Used said utility method instead of creating a temorary HashTrieSet with an empty elems array Added assertions to HashTrieSet to validate tree
* | | | | Merge pull request #1169 from rklaehn/SI-6261Josh Suereth2012-08-302-40/+52
|\ \ \ \ \ | |_|_|_|/ |/| | | | Si 6261
| * | | | Commented out assertionsRuediger Klaehn2012-08-281-3/+3
| | | | |
| * | | | Made ListMap.tail O(1) instead of O(N)Ruediger Klaehn2012-08-251-7/+7
| | | | | | | | | | | | | | | | | | | | That way it is possible to check if a ListMap has one element by checking x.tail.isEmpty. Size is O(1), so size==1 won't do!