| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
SI-6274 Fix owners when eta-expanding function with byName param
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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`.
|
|\ \
| | |
| | | |
Fix SI-6294.
|
| | | |
|
|\ \ \
| |_|/
|/| | |
Deprecate unmaintained/old classes for removal in 2.11
|
| | | |
|
| | |
| | |
| | |
| | | |
So it can be used in value classes.
|
|\ \ \
| | | |
| | | | |
Formatting cleanup in def typed.
|
| | | |
| | | |
| | | |
| | | | |
As seen on scala-internals.
|
|\ \ \ \
| | | | |
| | | | | |
further polishing of reflection
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
I think `isVal` and `isVar` are the right names, because they
exactly map on Scala syntax.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
As discussed, this is not the best API to expose, because this is an
implementation detail that might change.
However the ship has sailed. We're already imposing
the moduleClass <-> sourceModule quirk to the users of our API:
Evidence: http://stackoverflow.com/questions/12128783.
There are reflection tasks that cannot be pulled without the knowledge
of this implementation detail, so we shouldn't pretend that we can
change it on a whim and not break anything.
Hence I propose to add sourceModule to the public contract
and bear the potential consequences.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Symbol.pos is moved to macros.Universe, because it's empty at runtime.
Also added Symbol.associatedFile, because it has valid usages during runtime.
When reflecting one might want to get to a classfile of the symbol and then
analyze it to e.g. decompile the bytecode or find out the associated src file.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
no longer necessary, since scala.tools.nsc.io.AbstractFile
has been long moved to scala-reflect.jar
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
By giving ToolBox.mirror the correct type and constructing the underlying
mirror from a proper classloader, we improve user experience w.r.t
runtime code generation.
Direct motivator: http://stackoverflow.com/questions/12122939, in which
instances of a toolbox-generated class are accessed with Scala reflection.
|
| | | | |
| | | | |
| | | | |
| | | | | |
Doesn't seem to be inferrable from the API we expose right now
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
Doesn't seem to be inferrable from the API we expose right now
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Sure this stuff is also declared in Type.baseClasses, but this is
one of the hot paths in reflection (e.g. like ClassSymbol.typeParams),
so I think it's justified to have it as a dedicated method.
Unfortunately we cannot remove Type.baseClasses, because it includes
ridiculously involved calculation of base classes for compound types.
|
| | |_|/
| |/| |
| | | |
| | | | |
As requested in http://stackoverflow.com/questions/12078366/
|
|\ \ \ \
| | | | |
| | | | | |
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.
|
|\ \ \ \
| | | | |
| | | | | |
SBT build now works with SBT 0.12.
|
| | | | |
| | | | |
| | | | |
| | | | | |
Also fixed partest explosion that happened after partest redesign.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
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.
|
| | | | |
| | | | |
| | | | |
| | | | | |
Tuple2Zipped and Tuple3Zipped.
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Now extending AnyVal:
- RichInt, RichDouble, etc.
- ArrayOps.ofRef, ofBoolean, etc
- StringAdd
- StringFormat
The rest of it is the changes necessary to enable those.
|
|\ \ \ \
| | | | |
| | | | | |
Two fixes for the worksheet instrumenter
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
(1) Handle empty worksheets
(2) Handle for expressions
Review by @dragos
(cherry picked from commit 20dc9cd7848863097b07d1cb84ae3f729f7e94da)
|
|\ \ \ \
| | | | |
| | | | | |
Si 6220
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Added utility method to create a HashTrieSet with two leaf HashSets with different hash
Used said utility method instead of creating a temorary HashTrieSet with an empty elems array
Added assertions to HashTrieSet to validate tree
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Si 6261
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
That way it is possible to check if a ListMap has one element by checking x.tail.isEmpty. Size is O(1), so size==1 won't do!
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The old approach first created a broken HashTrieSet (with elems(0) == null) and then fixed it afterwards by assigning elems(0) from the outside. But that won't work with the assertion.
The new method is recursive, but the maximum recursion depth is 7, and on average the method won't recurse at all.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
If this is the case we must return subNew because a HashTrieMap with one leaf element is not allowed by the assertions
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
of it from HashMapCollision1.updated0 as well
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
While we still have to check for merger eq null in updated0 because updated0 gets called with a nu
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
HashTrieMap itself
|