| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|/ |
|
|\ \ |
|
| |/
|/| |
|
|/ |
|
|
|
|
|
|
|
|
|
|
| |
This commit fixes test cases mentioned in comment 03/Apr/12 to SI-4540.
Methods are fixed in leaf classes RichDouble|RichFloat|RichLong.
Their superclasses are not modified.
File is-valid-num.scala contains commented tests of
isValidLong|isValidFloat|isValidLong,
but they are not added anywhere now.
|
|
|
|
|
| |
eqTypeCode(Number) is equivalent to typeCode(Number).
CHAR code is impossible because java.lang.Character is not subclass of java.lang.Number.
|
|\ |
|
| |\ |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It makes me a bit nervous that NumericRange[Int] will
get different wrong values in overflow situations compared
to Range due to the missing toLong though.
It could probably need some investigation if reordering the
operations can rule out wrong values, e. g. only fail when
the fold also fails.
Apart from that, it might make sense to just throw an exception
if an overflow happens instead of silent overflow.
|
| | |
| | |
| | |
| | | |
That's why we have those nice test cases.
|
| | |
| | |
| | |
| | | |
Reusing small, simple methods rather than lots of cut and paste.
|
|\ \ \ |
|
| | |/
| |/| |
|
|\ \ \ |
|
| | \ \ | |
| | \ \ | |
| | \ \ | |
| | \ \ | |
| | \ \ | |
| | \ \ | |
| |\ \ \ \ \ \
| | |_|_|_|/ /
| |/| | | | |
| | | | | | | |
'refs/pull/356/head'; commit 'refs/pull/337/head'; commit 'refs/pull/339/head' into develop
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Changed StringContext.f which implements the formatted string interpolator.
Any '%' not in formatting position is left in the resulting string literally.
However, instead of adding '%s' format holders and extending the args with
"%" expressions, these '%' are replaced by '%%'. The formatter then converts
'%%' (percent formatter) to the literal % (\u0025).
The interpolation tests still pass.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Changed StringContext.f which implements the formatted
string interpolator.
Any '%' not in formatting position is left in the resulting string literally.
However, instead of adding %s format holders and extending the args with "%"
expressions, these '%' are replaced by '%%'. The formatter then converts '%%'
(percent formatter) to the literal '%' (\u0025). This also simplifies the spec.
The interpolation tests still pass.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This change fixes a bug in class StringContext.scala.
Parts were not correctly added to the resulting string.
This commit includes a test case which covers the
example reported in the bug.
Closes SI-5614.
|
| | | | |/ / |
|
| | |/ / / |
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Finally my dream of orderliness is within sight.
It's all pretty self-explanatory. More polymorphism, more immutable
identity, more invariants.
|
|/ / / |
|
| | | |
|
| | | | |
| \ \ | |
| \ \ | |
| \ \ | |
| \ \ | |
| \ \ | |
|\ \ \ \ \ \
| | | |_|_|/
| | |/| | |
| | | | | | |
'dlwh/issues/5632', 'jsuereth/feature/import-jars-from-maven', 'nadezhin/master' and 'axel22/feature/collection-concurrent' into develop
|
| | | | |\ \
| | | |_|/ /
| | |/| | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Conflicts:
src/library/scala/collection/JavaConversions.scala
src/library/scala/collection/JavaConverters.scala
Add one test for concurrent map conversion.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This required deprecating several old methods for converting ConcurrentMap.
Also, several new wrappers were introduced for concurrent.Map. Once we
remove ConcurrentMap in 2.11, we can remove its corresponding wrappers and
conversions in JavaConversions and JavaConverters.
|
| | |/ / /
| | | | |
| | | | |
| | | | | |
equality in mathematical sense
|
| | |\ \ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
runtime.AbstractPartialFunction provides a default implementation
for the new-style partial function. In principle this class is only
subclassed by compiler-generated partial functions arising from matches.
Either
- the apply method (old-style partialfun) or
- the applyOrElse method (current scheme)
must be overridden, and the isDefinedAt method implemented.
The applyOrElse method implementation is provided to ease the
transition from the old scheme, since starr still generates
old-style PartialFunctions, but locker's library has the
new AbstractPartialFunction.
Thus, this implementation is intended as a drop-in replacement for the
old partial function, and does not require changes to the compiler.
(compiler patches, both for old and new-style pattern matching, follow)
- runtime.AbstractPartialFunction is based on PartialFunction.WithDefault
Original version of FunctionWithDefault by Odersky
(http://article.gmane.org/gmane.comp.lang.scala.internals/4032)
- better performance for OrElse#applyOrElse, OrElse#lift, PF.cond
- new combinator methods: PF#run, PF#runWith, PF.apply
authored by @pavelpavlov, refactored by @adriaanm, review by @paulp
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Converts HashTable threshold to long before multiplying by a large value.
Test is very slow and requires giving partest more RAM. Rather than committing it, I'm attaching it as a gist. Whoever does the merge is more than welcome to commit it along with this patch…
Test: https://gist.github.com/2257703
|
| | | | | | |
| | \ \ \ | |
| |\ \ \ \ \
| | |_|/ / /
| |/| | | |
| | | | | | |
'axel22/feature/future-compat' into develop
|
| |/ / / /
| | | | |
| | | | |
| | | | | |
Now that there's an extensive parallel collections overview on http://docs.scala-lang.org, API comments should link to it ("see also" field). This commit also fixes a couple of broken links on some sequential collection types.
|
| | | | | |
|
| |/ / /
|/| | | |
|
| | | | |
|
|/ / /
| | |
| | |
| | |
| | | |
Removed some methods from execution contexts.
Changed Awaitable interface.
|
|\| |
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Introduced the collection.concurrent package and introduced the
concurrent.Map trait there. Deprecated the mutable.ConcurrentMap trait.
Pending work - introduce the appropriate changes to JavaConversions
and JavaConverters.
|
| | | |
| \ | |
| \ | |
| \ | |
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
'non/si-5609', 'adriaanm/topic/virtpatmat' and 'VladUreche/issue/5373' into develop
Conflicts:
test/scaladoc/scala/model/CommentFactoryTest.scala
|
| |_|/ /
|/| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This commit removes the (unused and unnecessary) elems* parameter
from the 'empty' method. It also adds 'ofDim' which allows the
user to allocate a FlatArray of a given size without providing
actual elements.
This fixes SI-5609.
|
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
The issue is closed as won't fix, but there are a few test cases
with respect to the model relevant to the issue. Also, correct
some typos.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For snapshots, it points to the exact commit, for releases it points to
the tag ("v" + maven version). The link now opens in a different tab,
as opening in the same frame is not compatible with github (the page
doesn't load for some reason).
Left the repo url in test/review untouched because it points to the
root of all LAMP repos. But... is anyone still using that script?!?
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This adds findAllMatchIn to Regex to mirror other similar methods.
It also overloads StringLike's "r", adding a version that accepts
group names.
It includes test cases for both methods.
Closes SI-2460.
|
| | | |
| \ | |
| \ | |
| \ | |
|\ \ \ \
| |_|_|/
|/| | |
| | | | |
'VladUreche/issue/5593', 'dragos/master', 'VladUreche/issue/5599', 'adriaanm/ticket/treeannot' and 'heathermiller/issue/5291' into develop
|
| | |/
| | |
| | |
| | |
| | |
| | | |
not tested for performance, but shouldn't add any memory overhead
see https://github.com/adriaanm/scala/commit/44362c557f for an example usage
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Initially motivated by SI-5580, then just motivated. I broke up
the opaquely named JavaConversions and JavaConverters into the following
traits encapsulating some permutation of
{ to java, to scala, bidirectional }
{ wrappers, decorators }
I named everything consistently in terms of either Wrappers
or Decorators. Decorators install those asJava/asScala methods
onto collections of the right kind; Wrappers hide the process.
JavaConversions then reduces to an object which (ill-advisedly)
extends both WrapAsJava and WrapAsScala. And JavaConverters is
an object extending DecorateAsScala and DecorateAsJava. However
other more clearly named vals exist in the newly created
scala.collection.convert package object.
val decorateAsJava = new DecorateAsJava { }
val decorateAsScala = new DecorateAsScala { }
val decorateAll = new DecorateAsJava with DecorateAsScala { }
val wrapAsJava = new WrapAsJava { }
val wrapAsScala = new WrapAsScala { }
val wrapAll = new WrapAsJava with WrapAsScala { }
So for instance to import asScala decorators, and only those:
scala> import scala.collection.convert.decorateAsScala._
import scala.collection.convert.decorateAsScala._
scala> new java.util.ArrayList[String].asScala groupBy (x => x)
res0: scala.collection.immutable.Map[String,scala.collection.mutable.Buffer[String]] = Map()
I propose we put those vals or a subset of them in the scala
package object rather than way down in scala.collection.convert.
|