summaryrefslogtreecommitdiff
path: root/src/library
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | | Fix StringContext documentation.Paul Phillips2012-10-011-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | It doesn't call "new", as I discovered after some head scratching.
| * | | | Merge pull request #1424 from soc/SI-6449Paul Phillips2012-10-0110-12/+12
| |\ \ \ \ | | |/ / / | |/| | | SI-6449 Adds version arg to @deprecated usages (non-compiler sources)
| | * | | Fix incomplete version strings (2.10 -> 2.10.0)Simon Ochsenreither2012-09-299-10/+10
| | | | |
| | * | | SI-6449 Adds version arg to @deprecated usages (non-compiler sources)Simon Ochsenreither2012-09-291-2/+2
| | | | |
| * | | | Merge remote-tracking branch 'scala/2.10.x' into 2.10.0-wipGrzegorz Kossakowski2012-09-291-2/+4
| |\ \ \ \ | | |/ / / | |/| | |
| | * | | Merge pull request #1347 from soc/SI-6380Grzegorz Kossakowski2012-09-281-2/+4
| | |\ \ \ | | | | | | | | | | | | SI-6380 Add @throws[Exception]
| | | * | | SI-6380 #1 Add @throws[Exception]Simon Ochsenreither2012-09-211-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change allows an additional notation of the @throws annotation: Old-style: @throws(classOf[Exception]) New-style: @throws[Exception] The optional String argument moves @throws in line with @deprecated, @migration, etc. and prevents confusion caused by the default inheritance of ScalaDoc comments and the non-inheritance of annotations. Before: /** This method does ... * @throws IllegalArgumentException if `a` is less than 0. */ @throws(classOf[IllegalArgumentException]) def foo(a: Int) = ... Now: /** This method does ... */ @throws[IllegalArgumentException]("if `a` is less than 0") def foo(a: Int) = ... ScalaDoc @throws tags remain supported for cases where documentation of thrown exceptions is needed, but are not supposed to be added to the exception attribute of the class file. In this commit the necessary compiler support is added. The code to extract exceptions from annotations is now shared instead of being duplicated all over the place. The change is completely source and binary compatible, except that the code is now enforcing that the type thrown is a subtype of Throwable as mandated by the JVM spec instead of allowing something like @throws(classOf[String]). Not in this commit: - ScalaDoc support to add the String argument to ScalaDoc's exception list - Adaption of the library
| * | | | | add a bit about unicode to scaladoc.Josh Suereth2012-09-281-0/+7
| |/ / / /
* | | | | Fix for SI-6452, leak in ListBuffer.Paul Phillips2012-09-301-13/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The private var which holds a pointer to the end of the list was not cleared even when the length of the buffer was reduced to 0.
* | | | | Merge branch '2.10.x' into 210-mergePaul Phillips2012-09-281-3/+60
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.10.x: (37 commits) Added logic and tests for unchecked refinements. Moved isNonRefinementClassType somewhere logical. Moved two tests to less breaky locations. Nailed down the "impossible match" logic. Finish docs for string interpolation. moves Context.ParseError outside the cake revives macros.Infrastructure moves Context.runtimeUniverse to TreeBuild.mkRuntimeUniverseRef a more precise type for Context.mirror gets rid of macros.Infrastructure simplifies Context.Run and Context.CompilationUnit exposes Position.source as SourceFile removes extraneous stuff from macros.Infrastructure merges macros.CapturedVariables into macros.Universe merges macros.Exprs and macros.TypeTags into Context removes front ends from scala-reflect.jar PositionApi => Position hides BuildUtils from Scaladoc MirrorOf => Mirror docs.pre-lib now checks for mods in reflect ... Conflicts: test/files/neg/t4302.check test/files/neg/unchecked.check test/files/neg/unchecked2.check
| * | | | Finish docs for string interpolation.Josh Suereth2012-09-271-3/+60
| | |_|/ | |/| |
* | | | Merge 2.10.x into master to fix breaking tests and keep things up-to-date.Josh Suereth2012-09-2714-27/+23
|\| | |
| * | | Privatize some collections internals.Paul Phillips2012-09-261-5/+5
| | | | | | | | | | | | | | | | These should not be public vars.
| * | | Don't overload implicit methods.Paul Phillips2012-09-262-3/+3
| | | | | | | | | | | | | | | | It is the cause of much unhappiness, and it is not necessary.
| * | | Don't write public methods with non-public parameters.Paul Phillips2012-09-261-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the parameter types of a method have lower visibility than the method itself, then the method cannot be overridden because the parameter types cannot be expressed. This is a confusing and frustrating situation to expose via public API. Such methods should either have access as strong as their parameter types, or be made final.
| * | | Don't write side-effecting nullary methods.Paul Phillips2012-09-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Style says never write methods like this: def foo: Unit If it is Unit, then it is side-effecting, and should be def foo(): Unit Since -Xlint warns about this, we must adhere to its dictate.
| * | | Avoid relying on auto-tupling.Paul Phillips2012-09-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When you call Some(a, b, c) The compiler does eventually figure out that you meant Some((a, b, c)) However the compiler finds this inordinately taxing, and because this auto-tupling is dangerous, -Xlint warns about it. In the interests of being able to hear -Xlint's important points, we write Some((a, b, c)) to give it less to warn about.
| * | | Improves SI-6409 - Add note to string flatMap about evaluation.Josh Suereth2012-09-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Note: flatMap has to evaluate the stream until it finds a head for the new stream. This is a limitation that will exist for 2.10.0, but the bug will remain open.
| * | | Merge pull request #1373 from smessmer/2.10.xGrzegorz Kossakowski2012-09-243-3/+3
| |\ \ \ | | | | | | | | | | Changed implementation comments from /** */ to /* */ for ScalaDoc
| | * | | Changed implementation comments from /** */ to /* */, so ScalaDoc remains ↵smessmer2012-09-213-3/+3
| | | | | | | | | | | | | | | | | | | | reasonable
| * | | | Merge pull request #1379 from retronym/topic/boxing-conversionsPaul Phillips2012-09-221-5/+0
| |\ \ \ \ | | | | | | | | | | | | Remove BoxingConversions from the scala package.
| | * | | | Remove BoxingConversions from the scala package.Jason Zaugg2012-09-221-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And add it to two test cases that rely on it. It is a remnant of the now-removed FlatArray (8cc7de74d).
| * | | | | Merge pull request #1370 from pavelpavlov/SI-5767Grzegorz Kossakowski2012-09-211-2/+0
| |\ \ \ \ \ | | | | | | | | | | | | | | LinkedHashSet scaladoc fix after FlatHashTable->HashTable transiton
| | * | | | | LinkedHashSet scaladoc fix after FlatHashTable->HashTable transitonPavel Pavlov2012-09-211-2/+0
| | | | | | |
| * | | | | | fix scala.collection.TraversableLike scaladocxuwei-k2012-09-211-1/+1
| | | | | | |
| * | | | | | fix Subscriber scaladocxuwei-k2012-09-211-1/+1
| | |/ / / / | |/| | | |
* | | | | | Merge branch '2.10.x'Paul Phillips2012-09-2043-4756/+416
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.10.x: (36 commits) Normalized line endings. New .gitattributes file. Disabled failing build manager tests. New test case for SI-6337 New test case for closing SI-6385 Value classes: eliminated half-boxing Cleanup of OverridingPairs Fixes SI-6260 Use faster download URL now that artifactory is fixed. don't try to create tags w/o scala-reflect.jar some small remaining fixes SI-5943 toolboxes now autoimport Predef and scala Fix for loud test. SI-6363 deploys the updated starr SI-6363 removes scala.reflect.base SI-6392 wraps non-terms before typecheck/eval SI-6394 fixes macros.Context.enclosingClass Error message improvement for SI-6336. Adjustments to scala.concurrent.duration. prepping for the refactoring ... Conflicts: src/actors-migration/scala/actors/Pattern.scala src/compiler/scala/tools/nsc/Global.scala src/compiler/scala/tools/nsc/transform/Erasure.scala src/compiler/scala/tools/nsc/typechecker/Typers.scala src/library/scala/collection/immutable/Vector.scala test/files/jvm/actmig-PinS_1.scala test/files/jvm/actmig-PinS_2.scala test/files/jvm/actmig-PinS_3.scala test/files/jvm/actmig-public-methods_1.scala
| * | | | | Merge pull request #1339 from rkuhn/wip-6389-finite-duration-multJosh Suereth2012-09-2010-246/+329
| |\ \ \ \ \ | | |_|/ / / | |/| | | | enable integer multiplication/divison on FiniteDuration, see SI-6389
| | * | | | some small remaining fixesRoland2012-09-204-27/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - added test for “span” and “fromNow” qualifiers - make those actually work even when there is an expected type - add ScalaDoc to them - verify (and fix) conversion Deadline -> FiniteDuration - also make Int * Duration => FiniteDuration work (and test it)
| | * | | | Adjustments to scala.concurrent.duration.Paul Phillips2012-09-195-196/+212
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | More use of implicit classes and value classes; aliased units to make importing TimeUnit and TimeUnit._ unnecessary; placed some classes in their own files because "the unit of compilation is the file" and we shouldn't bundle more than necessary; fixed some examples.
| | * | | | move Duration (incl. DSL) into scala.concurrent.duration packageRoland2012-09-197-35/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | so that the full package can be imported naturally: import scala.concurrent.duration._ will give you all the types (Duration, FiniteDuration, Deadline) and the DSL for constructing these.
| | * | | | improve performance of integer multiplication overflow check on DurationRoland2012-09-191-20/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - also rename divisor arguments to “divisor” - and add a scalacheck for multiplication overflow detection
| | * | | | enable integer multiplication/divison on FiniteDuration, see SI-6389Roland2012-09-181-3/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - without this "2.seconds * 2" will not return FiniteDuration but Duration - added test case verifying this behavior - matches normal arithmetics: integers throw on div-by-zero while doubles yield infinity; extended here to include overflow protection on integer multiplication
| * | | | | Merge pull request #1354 from scalamacros/ticket/6363Eugene Burmako2012-09-1925-4414/+7
| |\ \ \ \ \ | | | | | | | | | | | | | | merges scala.reflect.base into scala.reflect.api
| | * | | | | SI-6363 deploys the updated starrEugene Burmako2012-09-193-30/+0
| | | | | | |
| | * | | | | SI-6363 removes scala.reflect.baseEugene Burmako2012-09-1926-4371/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As the experience has shown, there's no need for a separate layer of reflection in scala-library.jar. Therefore I'm putting an end to it.
| | * | | | | prepping for the refactoringEugene Burmako2012-09-191-25/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reification (both tree-based and type-based) should be avoided before we release 2.10.0-final, since it impairs reflection refactorings like the upcoming one. Also the upcoming refactoring moves tag materialization anchors, and we have to add them to fast track in advance, so that they are treated as macros later.
| | * | | | | fixes NameTypes in base namesEugene Burmako2012-09-192-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NameType is introduced in base.StandardNames#NamesBase to abstract away the difference between term names and type names in order to encode common names such as EMPTY or WILDCARD. Flavor-specific name repositories, such as TermNames and TypeNames are supposed to override NameType fixing it to correspondingly TermName or TypeName. Unfortunately I completely overlooked this and as a result some standard names were typed with insufficient precision, e.g. This(tpnme.EMPTY) didn't work.
| | * | | | | SI-6390 removes Trees#ArrayValue from the APIEugene Burmako2012-09-192-42/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduced by uncurry - therefore it can be seen neither by macros, nor by runtime reflection. Despite never being pickled, ArrayValue is supported by unpickler so I couldn't move it exclusively to scala-compiler.jar. Figuring out the mysterious reason for pickling ArrayValue is left to future work.
| * | | | | | Merge pull request #1333 from paulp/less-inlineGrzegorz Kossakowski2012-09-198-97/+81
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | Removed many @inline annotations and final modifiers.
| | * | | | | | Removed many @inline annotations and final modifiers.Paul Phillips2012-09-188-97/+81
| | | |/ / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is my belief that these @inlines and finals landed between unhelpful and harmful. I am sure this will be disputed in some cases. It's too much and too difficult to measure except in the aggregate unless we have specific @inline sites to discuss. I don't know upon whom the burden of proof lies. I think we should err on the side given here, since there is no evidence of any consistent rationale being applied and it is easy to verify the negative impact scala compiler inlining can have on hotspot's far more sophisticated inlining.
* | | | | | | Merge pull request #1252 from mt2309/masterPaul Phillips2012-09-201-8/+14
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Remove extraneous null check in RedBlackTree
| * | | | | | | Remove extraneous null check in RedBlackTreeMichael Thorpe2012-09-041-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the RedBlackTree foreach method to be be a simple wrapper around a slightly shorter function, without an unnecessary nullity check.
* | | | | | | | Merge branch '2.10.x' into masterPaul Phillips2012-09-19120-632/+1175
|\ \ \ \ \ \ \ \ | | |/ / / / / / | |/| | | | | / | |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 2.10.x: (51 commits) improved/fixed reflection docs based on comments Fixes SI-6354: improved error messages for Dynamic signature mismatches. Add RedBlackTree tests for take/drop/slice. Retain Ordering in drop/take/slice signatures. test case closes SI-5770 clarify caveats of App trait Remove `@static` annotation from the library. New starr that does not depend on `@static`. improved reflection documentation pull request feedback SI-5692 better error message SI-5942 toolboxes now reset front ends SI-6287 fixes synthetic symbol clashes in toolbox Revert "Implement @static annotation on singleton object fields." Revert "WIP add private/lazy checks and a few tests." Revert "Fixes SI-6189." Revert "Fixes SI-6236." Revert "Fix SI-4581." Revert "Fix SI-6294." refactors java reflection tests ... Conflicts: src/compiler/scala/tools/nsc/typechecker/Typers.scala src/partest/scala/tools/partest/package.scala src/reflect/scala/reflect/internal/Trees.scala
| * | | | | | Merge pull request #1204 from chuvoks/rbGrzegorz Kossakowski2012-09-191-8/+17
| |\ \ \ \ \ \ | | |_|_|/ / / | |/| | | | | Rank based take/drop/slice
| | * | | | | Retain Ordering in drop/take/slice signatures.Juha Heljoranta2012-09-181-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Addresses code review feedback by @axel22.
| | * | | | | Rank based take/drop/slice.Juha Heljoranta2012-08-281-11/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tree navigation based on node rank is faster than using compare method. rank is simply count(tree.left) + 1.
| * | | | | | Merge pull request #1335 from cvogt/topic/reflection-scaladocEugene Burmako2012-09-1924-186/+681
| |\ \ \ \ \ \ | | |_|_|_|_|/ | |/| | | | | improved reflection documentation
| | * | | | | improved/fixed reflection docs based on commentsChristopher Vogt2012-09-1915-70/+155
| | | | | | |
| | * | | | | improved reflection documentationChristopher Vogt2012-09-1822-181/+591
| | | |_|/ / | | |/| | |