| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Pullrequest/reflection docs
|
| |
| |
| |
| |
| | |
Additionally includes improvements, formatting fixes, and link
additions and fixes.
|
|\ \
| |/
|/| |
SI-6453 Documentation links for @switch are broken
|
| | |
|
|\ \
| |/
|/| |
SI-6099 - Scaladoc for scala.concurrent incomplete
|
| |
| |
| |
| |
| |
| | |
This is a rebase and resubmission of @phaller's pull
https://github.com/scala/scala/pull/1485
With the reviewers' comments additionally addressed
|
|\ \
| |/
|/| |
Deprecated instrumentation API
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The instrumentation logic needed by the Scala IDE Worksheet is currently part
of the Scala project, but it doesn't need to be. I already have a PR ready for
completely removing the instrumentation logic, but I considered it too risky at
this point for 2.10.0 release (an oversight can lead to the impossibility of
running the worksheet with Scala 2.10.0).
For the moment, I believe it's better to deprecate the whole instrumentation
API in 2.10.0, and the PR for removing the instrumentation logic will target
2.10.1 or 2.11.0.
Besides deprecating the instrumentation API, this commit also raised visibility
of `interruptsEnabled` member in `Global`. This change alone is sufficient for
moving the instrumentation logic outside of the compiler, and it is needed
because the Presentation Compiler thread should never be interrupted while
instrumenting a source.
This commit is related to SI-6458
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit df9f470f14262b9b1002f022c2620d8c38835805 introduced
a change to `TraversableLike.filterNot` which broke Stream
implementation that does override `filter` implementation
but does not override `filterNot` implementation. This shows
clearly that reusing code for strict and non-strict collections
is very problematic.
Added a test-case covering this problem.
Closes SI-6440.
Review by @retronym.
|
|
|
|
|
|
|
|
| |
Since scala-reflect.jar is going to be declared experimental for 2.10.0,
it doesn't make sense to deprecate manifests in favor of type tags.
Class manifests, however, ARE deprecated for class tags, because class tags
don't require scala-reflect.jar and are generated independently of type tags.
|
|
|
|
|
|
|
|
|
| |
Also corrected the links in the library rootdoc.
**Note: We need to fast track this commit so it reaches master in the
next 12 hours, before we generate the next nightly docs.**
Review by @odersky
|
|\
| |
| | |
Fix StringContext documentation.
|
| |
| |
| |
| |
| | |
It doesn't call "new", as I discovered after some head
scratching.
|
|\ \
| |/
|/| |
SI-6449 Adds version arg to @deprecated usages (non-compiler sources)
|
| | |
|
| | |
|
|\ \
| |/
|/| |
|
| |\
| | |
| | | |
SI-6380 Add @throws[Exception]
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|/ / |
|
| | |
|
| |
| |
| |
| | |
These should not be public vars.
|
| |
| |
| |
| | |
It is the cause of much unhappiness, and it is not necessary.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| | |
| | | |
Changed implementation comments from /** */ to /* */ for ScalaDoc
|
| | |
| | |
| | |
| | | |
reasonable
|
|\ \ \
| | | |
| | | | |
Remove BoxingConversions from the scala package.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
And add it to two test cases that rely on it.
It is a remnant of the now-removed FlatArray (8cc7de74d).
|
|\ \ \ \
| | | | |
| | | | | |
LinkedHashSet scaladoc fix after FlatHashTable->HashTable transiton
|
| | | | | |
|
| | | | | |
|
| |/ / /
|/| | | |
|
|\ \ \ \
| |_|/ /
|/| | | |
enable integer multiplication/divison on FiniteDuration, see SI-6389
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
- 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)
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
- also rename divisor arguments to “divisor”
- and add a scalacheck for multiplication overflow detection
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
- 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
|
|\ \ \ \
| | | | |
| | | | | |
merges scala.reflect.base into scala.reflect.api
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Removed many @inline annotations and final modifiers.
|
| | |/ / /
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|
|\ \ \ \ \
| |_|/ / /
|/| | | | |
Rank based take/drop/slice
|