| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
SI-5877 Support implicit classes in package objects
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| | |
| | | |
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.
|
| | |_|/
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
| | |/ / /
| |/| | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-1672 Catches are in tail position without finally.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
- Includes a run test to check bytecode verifies and behaves
- Show this isn't possible when try is used as an expression,
and a `liftedTree` local method is needed.
|
| |/ / / /
| | | | |
| | | | |
| | | | | |
So we can eliminate tail calls within.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Warn when generated classfiles differ only in case.
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | | |
We should most likely prohibit it completely, but warning
is a start.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-6535 Step back from the precipice of a cycle
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Adding any non-local parent to WrapAsScala will trigger a valid
cyclic reference error. By moving the import of `Wrapper._`
inside `WrapAsScala` and `WrapAsJava`, it is not in scope when
typing the parents of those, and we avoid the cycle.
Adds a test case to show the essense of the promiscious mutual
imports that triggers this.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-6549 Improve escaping in REPL codegen.
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
- Escape the LHS of an assign when printing results
- e.g. X("").foo = bar
- Escape val names
- e.g. val `"` = 0`
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-6547: elide box unbox pair only when primitives match
|
| | |_|_|/
| |/| | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-6667 Abort after any ambiguous in-scope implicit
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Rather than continuing on to a search of implicits
of the expected type.
Previously, the companion implicits were searched if the
the caller was running the implicit search in silent
mode, for example if searching for an implicit parameter
in an application which has an expected type.
After this commit, the behaviour is consistent, regardless
on silent/non-silent typing.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
SI-4664 Make scala.util.Random Serializable
|
| | |/ / / /
| |/| | | | |
|
|\ \ \ \ \ \
| |_|_|_|_|/
|/| | | | | |
Fix for SI-6712, bug in object lifting.
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
refactors handling of parent types
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Similarly to global.emptyValDef, which is a dummy that stands for an
empty self-type, this commit introduces global.pendingSuperCall, which
stands for a yet-to-be-filled-in call to a superclass constructor.
pendingSuperCall is emitted by Parsers.template, treated specially by
Typers.typedParentType and replaced with a real superclass ctor call
by Typers.typedTemplate.
To avoid copy/paste, this commit also factors out and unifies dumminess
of EmptyTree, emptyValDef and pendingSuperCall - they all don't have a
position and actively refuse to gain one, same story for tpe.
|
| | |_|_|_|/
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
At the moment parser does too much w.r.t handling of parent types.
It checks whether a parent can have value arguments or not and
more importantly, it synthesizes constructors and super calls.
This approach is fundamentally incompatible with upcoming type macros.
Take for example the following two snippets of code:
`class C extends A(2)`
`class D extends A(2) with B(3)`
In the first snippet, `A` might be a type macro, therefore the super call
`A.super(2)` eagerly emitted by the parser might be meaningless. In the
second snippet parser will report an error despite that `B` might be
a type macro which expands into a trait.
Unfortunately we cannot simply augment the parser with the `isTypeMacro`
check. This is because to find out whether an identifier refers to a type
macro, one needs to perform a typecheck, which the parser cannot do.
Therefore we need a deep change in how parent types and constructors
are processed by the compiler, which is implemented in this commit.
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
As experience shows, these methods can easily be a source of confusion
for the newcomers: https://issues.scala-lang.org/browse/SI-6696.
I'm only leaving the TypeTree(tp) factory, since the facility to
set underlying types for type trees is not exposed in the public API,
as it's inherently mutable.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-6631 Handle invalid escapes in string interpolators
|
| | |/ / /
| |/| | |
| | | | |
| | | | | |
Patch contributed by Rex Kerr.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
tests for idempotency issues in the typechecker
|
| | |/ / /
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
For more details see https://issues.scala-lang.org/browse/SI-5464.
Check files are intentionally very precise, so that we can monitor
how the situation changes over time.
|
|\ \ \ \ \
| |_|_|_|/
|/| | | | |
Fix for SI-6731, dropped trees in selectDynamic.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
All tickets involving selectDynamic fixed by the prior commit.
It also fixes SI-6663, but that already has a test case.
|
| | | | |
| | | | |
| | | | |
| | | | | |
I rewrote mkInvoke entirely, and boosted the test coverage.
|
|\ \ \ \ \
| |_|_|/ /
|/| | | | |
Asserts about Tree qualifiers.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Encoding recent revelations about certain tree invariants
in the form of asserts.
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
SI-5753 macros cannot be loaded when inherited from a class or a trait
|
| | | | | |
|