| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
I just can't shake the feeling more people should see the
things that I see.
scalac -Dscalac.debug.syms foo.scala
|
|
|
|
| |
Don't type pattern trees with annotations still attached.
|
|
|
|
|
|
|
|
| |
Avoid explicit type arguments which don't conform to bounds
where they could be successfully inferred.
I had to disable one "neg" test which is no longer neg.
Can anyone clue me in as to whether it is important?
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The source of many bugs over the years is that the first is
represented as a TypeRef and the second a SingleType. Over a
great period of time I figured out how to shield us from the
more obvious bug manifestations, but a recent comment by adriaan
jarred me into realizing that we can fix it at the source.
This commit changes <:< and =:= to recognize when those two
representations are being compared and to treat them as equivalent
regardless of which is on the left. The reason I don't quash one
representation entirely is that a fair bit of code depends on
singleton types having an underlying type which is not the same,
and regardless of that it would entail more changes and more risk.
The change allows removing the type inference conditions which
worried about this, and also fixes SI-4910.
scala> val t1 = typeRef(ScalaPackageClass.thisType, NoneModule.moduleClass, Nil)
t1: $r.intp.global.Type = None.type
scala> val t2 = t1.narrow
t2: $r.intp.global.Type = None.type
scala> (t1.getClass, t2.getClass)
res20: (Class[?0], Class[?0]) forSome { type ?0 <: $r.intp.global.Type; type ?0 <: $r.intp.global.Type } =
(class scala.reflect.internal.Types$ModuleTypeRef,class scala.reflect.internal.Types$UniqueSingleType)
scala> ((t1 =:= t2, t2 =:= t1, t1 <:< t2, t2 <:< t1))
res21: (Boolean, Boolean, Boolean, Boolean) = (true,true,true,true)
|
|\ \ |
|
| | | |
|
|/ / |
|
| | |
|
|\ \ |
|
| | \ | |
| | \ | |
| | \ | |
| | \ | |
| | \ | |
| | \ | |
| |\ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | | |
'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
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
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
|
| | | | | | |
|
| | | | | | |
|
| |_|_|/ /
|/| | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
"References to the type parameters in object-private or
object-protected values, variables, or methods (§5.2) of
the class are not checked for their variance position."
Review by @odersky.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Yet more funnelling of immutable creation-time known information
into the identities of symbols and types.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Made generic type unwrapper for use by the many methods which
need various types to be transparent with respect to the operation
being performed. AnnotatedType, PolyType, NullaryMethodType,
and ExistentialType all commonly match this description.
|
| |_|/ /
|/| | |
| | | |
| | | |
| | | | |
More principled logic for determining if a type is a particular
type or a specialized subtype of that type.
|
|\ \ \ \
| |_|/ /
|/| | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
this corner case in Duplicators is hit when compiling
the new AbstractPartialFunction (which is specialized) under -Yvirtpatmat
TODO: why do we need to guard against cx.scope eq null in typers?
review by @vladureche
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
avoid casting default call in applyOrElse:
the result type of the match is always B1,
not the result type inferred from typing the cases
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
minimal fixes for typedMatchAnonFun so it compiles
TODO: support for AbstractTotalFunction (when match is exhaustive)
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
| | | |
| | | |
| | | |
| | | | |
A classic "off by two" error. Closes SI-4545, SI-5633.
|
| | | |
| | | |
| | | |
| | | | |
It's -Ycheck:jvm, not -Ycheck:genjvm. There is no genjvm.
|
| | | | | |
| \ \ \ | |
|\ \ \ \ \
| |_|/ / /
|/| | / /
| | |/ / |
'axel22/feature/future-compat' into develop
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Removed some methods from execution contexts.
Changed Awaitable interface.
|
| | | |
| | | |
| | | |
| | | | |
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.
|
|/ / / |
|
|/ /
| |
| |
| |
| |
| | |
Closes SI-3569, SI-3770.
Also threw in experimental -Yoverride-vars. It's not robust.
|
|\ \ |
|
| | | |
|
|\ \ \
| | |/
| |/| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Not actually a fix, but when we see a package where a module is
expected, it's not a great stretch to try the package object.
References SI-5604.
|
| | | | |
| \ \ | |
| \ \ | |
| \ \ | |
| \ \ | |
| \ \ | |
| \ \ | |
| \ \ | |
|\ \ \ \ \ \ \
| |_|_|_|_|_|/
|/| | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
'non/si-5609', 'adriaanm/topic/virtpatmat' and 'VladUreche/issue/5373' into develop
Conflicts:
test/scaladoc/scala/model/CommentFactoryTest.scala
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
And adds basic support for scaladoc model tests (class
partest.ScaladocModelTest)
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
didn't realize this was done for the old pattern matcher, so now we have "feature"-parity
we still infer bad type arguments for type patterns -- see e.g., pos/t602.scala --
also, inference changes when you turn a case class into
the corresponding class&companion object, with the same unapply as the synthetic one
TODO: can we merge inferConstructorInstance & inferTypedPattern,
or at least make them behave consistently?
|
| | | | |\ \ \ |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
for selector-less matches that should yield a function
|
| | | | | |/ /
| | | | |/| |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
... but not before, to avoid having skolems in typedMatchAnonFun
cast result of missingCase (avoid skolem mismatch)
relevant test cases: pos/existentials-harmful.scala, pos/gadt-gilles.scala, pos/t2683.scala, pos/virtpatmat_exist4.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.
|