| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Otherwise they trigger spurious feature warnings.
scala> trait T { implicit var a: Any }
<console>:7: warning: implicit conversion method a_= should
be enabled by making the implicit value
language.implicitConversions visible.
|
|\
| |
| | |
SI-5361 Avoid cyclic type with malformed refinement
|
| |
| |
| |
| |
| | |
Check for malformed stats in the refinement body in
the same place we check for erroneous parents.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The statement `val x = this` in the refinment type:
(new {}): {val x = this}
is lazily typechecked, in order to, according to the comment
in `typedRefinment, "avoid cyclic reference errors".
But the approximate type used ends up with:
Refinment@1(
parents = [...]
decls = { val x: Refinement@1 })
This commit eagerly checks that there is no term definitions
in type refinments, rather than delaying this.
This changes the error message for SI-3614.
|
|\ \
| | |
| | | |
typedIdent no longer destroys attachments
|
| | |
| | |
| | |
| | |
| | | |
When transforming Idents to qualified Selects, typedIdent used to forget
about carrying original attachments to the resulting tree. Not anymore.
|
|\ \ \
| | | |
| | | | |
SI-6288 Perfecting positions
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
- Adds tests for unapplySeq and unapply: Boolean.
Both seem to be well positioned after the previous
changes.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The call to `Option#get` on the result of the
unapply method was unpositioned and ended up
with the position of the `match`.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
ICode generation was assigning the position of
the last label jump to all jumps to that particular
label def.
This problem is particularly annoying under the new
pattern matcher: a breakpoint in the body of the final
case will be triggered on the way out of the body of
any other case.
Thanks to @dragos for the expert guidance as we
wended our way through GenICode to the troublesome
code. Chalk up another bug for mutability.
I believe that the ICode output should be stable
enough to use a a .check file, if it proves otherwise
we should make it so.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
`atPos(pos) { ... }` doesn't descend into children of
already positioned trees, we need to manually set the
position of `CODE.REF(binder)` to that of the stunt double
`Ident(nme.SELECTOR_DUMMY)`.
|
|\ \ \ \
| | | | |
| | | | | |
s/SuperCallArgs/SuperArgs/
|
| |/ / /
| | | |
| | | |
| | | |
| | | | |
Applies a minor renaming that I failed to thoroughly perform
in the last pull request which refactored parent types.
|
|\ \ \ \
| | | | |
| | | | | |
prevents spurious kind bound errors
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This patch is an isomorphic transformation of checkBounds, which avoids
doing any checks altogether if the scrutinee is already erroneous.
Inspection of checkKindBounds and isWithinBounds called from checkBounds
suggests that they don't perform side effects which can't be omitted.
|
| |/ / /
| | | |
| | | |
| | | |
| | | | |
The patch adds a check which makes sure that the trees we're about to
report aren't already erroneous.
|
|\ \ \ \
| | | | |
| | | | | |
When we strip tvars we should also recursively strip their instantiation...
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This led to the inference of weird types as list
of lub base types was empty.
This change fixes case x3 in the test case.
|
|\ \ \ \ \
| |_|_|/ /
|/| | | | |
Fixes SI-6758: force LazyAnnnotationInfo for DefDef and TypeDef
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Looks like the change in 25ecde037f22ff no longer forced
lazy annotations for some of the cases.
Also removed forcing for PackageDef annotations as we currently
don't support them.
|
|\ \ \ \
| | | | |
| | | | | |
Extract base scaladoc functionality for the IDE.
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
DRYer crash reports.
|
| | |_|/ /
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
- Add the supplementary message only once per run, so we don't
output the same information as we bubble up through a sequence
of well-intentioned exception handlers.
- In Driver, don't report message of a `FatalException`
immediately after reporting the message and stack trace.
- Rename `logThrowable` to `reportThrowable`, which is what it
actually does.
The difference in output is visible:
https://gist.github.com/4242138
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-6555 Better parameter name retention
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We were losing track of parameter names in two places:
1. Uncurry was using fresh names for the apply method
parameters during Function expansion. (The parameter names
in the tree were actually correct, they just had synthetic
symbols with "x$1" etc.)
2. When adding specialized overrides, the parameter names
of the overriden method were used, rather than the parameter
names from the overriding method in the class to which we are
adding methods.
The upshot of this is that when you're stopped in the debugger in
the body of, say, `(i: Int) => i * i`, you see `v1` rather than `i`.
This commit changes Uncurry and SpecializeTypes to remedy this.
|
|\ \ \ \ \
| |_|_|/ /
|/| | | | |
Ticket/5841
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Cases in reifyBoundTerm are merged by constructors; conditions in reifyBoundType are linearized;
also, in latter, or-patterns are used to merge some cases;
and some minor stuff not worth mentioning.
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | | |
Reification of renamed imports is done by catching Selects with name != their tree.symbol.name,
replacing this name with tree.symbol.name, and then doing reifyProduct in case
of renamed terms and reifyBoundType (inner) in case of renamed types.
|
|\ \ \ \
| | | | |
| | | | | |
SI-5877 Support implicit classes in package objects
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Reuses existing function `isInPackageObject` and reads
better.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This used to crash, as both the package and the package object
had the synthetic method in `decls`, and the typer tried to add
the tree to both places.
Now, synthetics in the package object are excluded from the pacakge
itself.
|
| | |_|/
| |/| |
| | | |
| | | | |
Investigatory tools for SI-5877
|
|\ \ \ \
| | | | |
| | | | | |
SI-6558: typecheck lazy annotation info using non-silent context
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Reporting some errors prevents reporting others. This
residual issue had been lodged as SI-6758.
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
Make context for typing lazy annotations always non-silent. If lazy annotation info was created in local (silent) context, error could go unnoticed because later they would still use silent typer for typing the annotation.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-4922 Show default in Scaladoc for generic methods.
|
| | |_|/ /
| |/| | |
| | | | |
| | | | | |
We must account for cloned symbols.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-6614 Test case for fixed ArrayStack misconduct.
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Not sure when it was fixed, but in 2.9.2 things were
messed up:
scala> (for (i <- 0 to 10) yield { val in = ArrayStack.tabulate(i)(_.toString); (in, (in filter (_ => true)) == in) }).mkString("\n")
res14: String =
(ArrayStack(),true)
(ArrayStack(0),true)
(ArrayStack(0, 1),true)
(ArrayStack(1, 2, null),false)
(ArrayStack(0, 1, 2, 3),true)
(ArrayStack(3, 4, null, null, null),false)
(ArrayStack(2, 3, 4, 5, null, null),false)
(ArrayStack(1, 2, 3, 4, 5, 6, null),false)
(ArrayStack(0, 1, 2, 3, 4, 5, 6, 7),true)
(ArrayStack(7, 8, null, null, null, null, null, null, null),false)
(ArrayStack(6, 7, 8, 9, null, null, null, null, null, null),false)
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-6690 Release reference to last dequeued element.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This is in line with the existing implementation
of `MutableList#clear`, and in line with an newly
created empty collection.
|
| | |_|/ /
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Avoids leaks in MutableList and its more better known child,
mutable.Queue, when the last element is dequeued or when we
take the tail of a one element collection.
Refactors copy/pasted code between the two implementations of
tail.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-5789 Removes assertion about implclass flag in Mixin.scala
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Don't check for the crashed message, just dump the output
from the REPL. Use the ReplTest framework to the make
the test clean
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
In my other commit I had a version of the test that didn't
actually reproduce the problem because it didn't set the
optimize flag
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The assertion that the class being mixed from should be an implclass
seems reasonable, but the flag isn't always set. In order to stop the
bleeding this fix turns the assertion into a debug warning. Issue SI-6782
will track figuring out the root cause of the missing flag.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
SI-5894 Don't emit static forwarders for macros.
|
| | | | | | | |
|