| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
When eta-expanding a function that takes a by-name param the local definition
for the corresponding argument is a function-0
val eta$1 = () => { argument-to-by-name }
If there are any definitinos in the `argument-to-by-name`, the symbol
owner needs to be changed to the anonymous function's symbol.
To know the function symbol in eta expand, we need to type-check the
function, and therefore pass the `Typer` instance to `etaExpand`.
|
|
|
|
| |
So it can be used in value classes.
|
|\
| |
| | |
further polishing of reflection
|
| |
| |
| |
| |
| | |
I think `isVal` and `isVar` are the right names, because they
exactly map on Scala syntax.
|
|\ \
| | |
| | | |
Fix for SI-6273, repl string interpolation.
|
| | |
| | |
| | |
| | |
| | |
| | | |
As usual the hard part is tracing through all the
needless abstraction. Begone, 25 layers of parsing error
issuing methods!
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When an error occurs because some type does not conform
to AnyRef (and an AnyRef-derived type would have sufficed)
try to say something useful about the situation.
This commit also initializes scope members before printing
error messages because the + version seems more useful than
the - version (taken from one of the checkfile diffs.)
- def <init>: <?>
- def methodIntIntInt: <?>
+ def <init>(): X
+ def methodIntIntInt(x: scala.Int,y: scala.Int): scala.Int
|
| | |
| | |
| | |
| | |
| | |
| | | |
Don't try to implicitly convert an unstable prefix
to a stable one by applying a view. As the matrix spoon kid
says, "that's impossible."
|
|/ /
| |
| |
| |
| | |
I have seen this warning a bunch of times and it has not yet
been close to right.
|
|\ \
| | |
| | | |
Fix for SI-6034, covariant value classes.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
My summary in the ticket was incorrect. The problem was that the
class type parameters were being cloned for the method and being
allowed to keep their variance. I threw in an assertion for anyone
attempting to create a method type with variant type parameters,
because hey, why should we allow such madness.
|
|\ \ \
| | | |
| | | | |
Fix SI-4581.
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | | |
Specifically, the final flag on the generated static field
is no longer ommitted.
Fix 2 failing test-cases.
|
|\ \ \
| | | |
| | | | |
Fixes SI-6290 by creating real instnaces of language features.
|
| | | | |
|
| |_|/
|/| |
| | |
| | |
| | | |
The test exercises the most important case, when implicits are invalidated through shadowing.
(See SI-4270)
|
|\ \ \
| | | |
| | | | |
Expanded the reach of value classes.
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Now extending AnyVal:
- RichInt, RichDouble, etc.
- ArrayOps.ofRef, ofBoolean, etc
- StringAdd
- StringFormat
The rest of it is the changes necessary to enable those.
|
|\ \ \
| | | |
| | | | |
Si 6220
|
| | | |
| | | |
| | | |
| | | | |
This test will pass even with an older version of the scala library, since as mentioned this is just a performance improvement.
|
|\ \ \ \
| | | | |
| | | | | |
Si 6261
|
| | | | | |
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
elements
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Closes SI-6227
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
I added some general hook where one can add validation code before a name conflict involving at least one implicit symbol is reported.
|
| |_|_|/ /
|/| | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Still need to determine if this is a systemic
issue and needs to be addressed higher in the
linked list hierarchy. For now, just
fixing the reported bug, with a note here
for other maintainers.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
removes Symbol.kind and Type.kind
|
| | |_|_|/
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
use Universe.showRaw instead:
scala> import scala.reflect.runtime.{universe => ru}
import scala.reflect.runtime.{universe=>ru}
scala> ru.showRaw(typeOf[Int])
res0: String = TypeRef(ThisType(scala), scala.Int, List())
scala> ru.showRaw(typeOf[Int].typeSymbol, printKinds = true)
res1: String = scala.Int#CLS
|
|\ \ \ \ \
| | | | | |
| | | | | | |
PartialFunction polishing
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
- ScalaDocs added
- TODOs fixed
- controversive method `run` deleted
- not used class runtime.AbstractTotalFunction removed
- small corrections & fixes
- tests for `orElse` & `runWith`
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Fix for SI-6283, no abstract value classes.
|
| | |_|/ / /
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The needless abstraction penalty was in full flower in Namers.
I managed to find somewhere else to issue this error, where I
can still just write an error message without tracking down an
enumeration in a separate file and inventing an intermediate
name for the enum member.
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
Add missing tests for SI-6190
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This was silently fixed in commit
3cb0e784a05db7d0b542cec9bf4c5fbf3772a6cf but no test was added.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
SI-6272 Support lazy vals defined in try in template.
|
| |/ / / / / |
|
|\ \ \ \ \ \
| |_|_|/ / /
|/| | | | | |
Eliminated a metric ton of allocations.
|
| | |/ / /
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Thanks to the hotspot DTrace probes. I'm not sure why
this checkfile changed, but hopefully it's innocuous.
Review by @VladUreche for the checkfile and @gkossakowski
so he can tell me how much faster.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
macroArgs now correctly calculates the argss in case when a macro def
has implicit parameters.
Macro impls can never have implicit parameters other than type tag evidences,
so tags will always come in a separate parameter list w.r.t other parameters
of macro impls (which are in 1-to-1 correspondence with the parameters of
macro defs).
Example 1:
def w/o implicits: (params1)...(paramsN)
impl w/o tags: (params1')...(paramsN')
Example 2:
def w/o implicits: (params1)...(paramsN)
impl w tags: (params1')...(paramsN')(implicit tags)
Example 3:
def w implicits: (params1)...(paramsN)(implicit paramsN+1)
impl w/o tags: (params1')...(paramsN')(paramsN+1')
Note: paramsN+1' is not an implicit parameter list
because impls cannot have implicit parameters other than tags
Example 4:
def w implicits: (params1)...(paramsN)(implicit paramsN+1)
impl w tags: (params1')...(paramsN')(paramsN+1')(implicit tags)
Therefore we don't need to merge the argss.last (that correspond to implicit
parameters of macro defs) with tags, as it was incorrectly coded before.
We just need to append tags to argss.
|
| |/ / /
|/| | | |
|
|\ \ \ \
| |/ / /
|/| | | |
reverts changes to ClassTag.Nothing
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
It seemed to be a good idea to have ClassTag.Nothing crash
in agreement with its incalculable nature.
However this breaks CanBuildFrom for the situations when Nothing is inferred
or provided explicitly. Hence the rollback.
|
|\ \ \ \
| | | | |
| | | | | |
Improved fix for SI-1987, overloading in package objects.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
When reformulating an errant package object overload,
don't forget to fully qualify it lest you trade one error
for another.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
JavaConversions: Restore source compatibility with 2.9
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Even after the parent change, implicit conversions should still convert
ConcurrentHashMap to concurrent.Map and not to mutable.ConcurrentMap.
I'll include the comment by axel22 which prompting this change (taken
from https://github.com/scala/scala/pull/1172#issuecomment-7928285)
since it is highly informative and links to pull request comments might
not be very stable:
<<
Instead of just testing an implicit conversion to ConcurrentMap, the
test should call ConcurrentMap methods such as putIfAbsent (which
returns an Option[T]) and replace, to see if the correct Scala
concurrent map trait is being resolved.
The problem is that putIfAbsent already exists on juc.ConcurrentMap so
instead of triggering an implicit conversion, a type mismatch error is
output anyway.
And we cannot test that the correct concurrent map trait is returned
using methods like map, flatMap and friends, because concurrent map
traits extends mutable.Map anyway.
For this reason, I recommend to add this to the test:
scala> val a = new java.util.concurrent.ConcurrentHashMap[String,
String]() += (("", ""))
a: scala.collection.concurrent.Map[String,String] = Map("" -> "")
and make sure that the returned map is concurrent.Map, not
mutable.ConcurrentMap (the above += is one of the few methods in
collection that has the return type this.type).
>>
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Readd an implicit conversion which was available in 2.9, the one from
`java.util.concurrent.ConcurrentMap` (`juc.ConcurrentMap`) to the (now
deprecated) type `scala.collection.mutable.ConcurrentMap`.
This implicit conversion can also be used to convert from
`juc.ConcurrentMap`
to `collection.Map` and creates an ambiguity error in
test/files/run/map_java_conversions.scala. To fix this, I have given
lower priority to the new conversion.
Moreover, update the documentation in `JavaConversions`: mark this
conversion as deprecated and mention the new conversion which replaces
it, converting to `scala.collection.concurrent.Map`.
I discussed this issue previously with Paul Phillips on scala-language:
https://groups.google.com/d/topic/scala-language/uXKRiGXb-44/discussion
|
|\ \ \ \ \ \
| |_|/ / / /
|/| | | | | |
Fix stupid logic inversion of try-catch
|