| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Refactor to reduce the Reporter interface. Working towards
minimal interfaces in scala.reflect.internal that can be consumed by sbt/IDE/....
The scala.tools.nsc package is entirely private to the compiler (in principle).
A `Reporter` should only be used to inform (info/warning/error). No state.
Ideally, we'd move to having only one reporter, whose lifetime is adjusted
appropriately (from per-run in general to per-context for type checking,
so errors can be buffered -- "silenced" -- during nested type checking calls).
Start the clean up by moving truncation to the REPL,
since it's not relevant for regular reporting. Perversely, we were checking
truncation all the time, even though it's only on during a repl run.
(Truncation is now always turned off in the repl under -verbose.)
Untangle error resetting on symbols from error reporting (reportAdditionalErrors).
This fixes a nice&subtle bug that caused feature warnings to be suppressed under
`-Xfatal-warnings`:
```
def reportCompileErrors() {
if (!reporter.hasErrors && reporter.hasWarnings && settings.fatalWarnings)
globalError("No warnings can be incurred under -Xfatal-warnings.")
if (reporter.hasErrors) { ... }
else {
// will erroneously not get here if
// `reporter.hasWarnings && settings.fatalWarnings`
// since the `globalError` call above means `reporter.hasErrors`...
allConditionalWarnings foreach (_.summarize())
...
}
}
```
The second `if`'s condition depends on the `globalError` call in the first `if`...
|
|\
| |
| | |
SI-8335 List.++ avoidably burns memory
|
| |
| |
| |
| | |
Changed to check the identity of the CanBuildFrom instead of the identity of the generated builder to shortcut building. Should reduce memory churn on ++ a little.
|
|\ \
| | |
| | | |
SI-8494 Restore filtering javap output
|
| | |
| | |
| | |
| | |
| | |
| | | |
When filtering javap output, include specialized versions
of methods. For anonfuns, in particular, the apply$sp is
the method of interest.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Regressed in support for new delayedEndPoint, where it must
pick what to filter for.
`s/claas/klass/` and similar.
|
|\ \ \
| | | |
| | | | |
SI-8638 Empty UnrolledBuffer hangs on prepend.
|
| | |/
| |/|
| | |
| | |
| | |
| | | |
Tracked down bug to incorrect recursion in insertAll. Fixed by adding a missing case (which incidentally will provide better performance when adding to the end of a block).
No specific tests, as this is caught by quasi-complete collections tests.
|
|\ \ \
| | | |
| | | | |
SI-5200 Incorrect advice for implementing mutable.Set in scaladoc
|
| |/ /
| | |
| | |
| | | |
Fixed advice; it was already there in mutable.SetLike but a case sensitivity error kept it from appearing.
|
|\ \ \
| | | |
| | | | |
SI-7115 JMapWrapper.get can incorrectly return Some(null)
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This isn't incorrect. Trying to use a single-threaded interface in a concurrent context is supposed to break in various unpleasant ways.
Documentation has been added to encourage one to avoid wrapping a concurrent map in the generic wrapper (which assumes a single thread), and pointing out that synchronized maps do not maintain synchronization for non-atomic operations (including get).
More docs.
|
|\ \ \
| | | |
| | | | |
SI-7577 Incorrect documentation: current default isn't Vector
|
| | | |
| | | |
| | | |
| | | | |
Fixed documentation to specify List in four cases where it was wrong or missing.
|
|\ \ \ \
| | | | |
| | | | | |
SI-8447 fix TypeTree printing (2.11.x)
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-8609 Fix flattening of definitions and imports in quasiquotes
|
| | |_|_|/
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Quasiquotes allow to unquote trees with ..$ with block flattening
semantics to simplify composition:
val onetwo = q"1; 2"
val onetwothree = q"..$onetwo; 3" // same as q"1; 2; 3"
If there is no block it will be equivalent to $ unquoting:
val one = q"1"
val onetwo = q"..$one; 2" // same as q"1; 2"
But the inconsistency here is that currently only terms support
this single-element semantics. This commit extends this functionality
to also support definitions and imports. So that following code works:
val q1 = q"val x = 1"
val q2 = q"..$q1; val y = 2" // same as q"val x = 1; val y = 2"
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Document SuperAccessors
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | | |
Added comment giving an up-to-date overview of SuperAccessors
and how we might want to change it.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-8675 Avoid unreported error after second try using implicit view
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
As reported on scala-internals. After tightening up the treatment
of undetermined type parameters in SI-7944, the enclosed test
case no longer typechecks. And since the regression fixed in the
previous commit, the error was swallowed by the typechecker only
to be burped up by a crash in the backend.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This is specific to situations in which we first typecheck an
application `qual.m(arg)` against the method `m` directly provided
by `qual`, and then fall back to `implicitView(qual).m(arg)`.
Regressed in SI-3971 / 7fa77af, in which error reports were moved
to the innermost `Apply`, and the check for `errorInResult` was
accordingly changed to recurse through `Apply` trees.
Before that change, we did not fall back to using a view. After the
change, we do try a view. We retypecheck the arguments under the
`retyping` mode (see `tryTypedArgs`), but this doesn't seem to
be enough to avoid leaking the error typed nested trees from the
first try.
Here's an example from the enclosed test case:
a.update(0, x[A]({new isString(true)}))
`-- error typed
refArrayOps(a).update(0, x[A]({new isString(true)}))
` `-- error type persists
`-- this tree is retypecked by tryTypedArgs
This commit changes `onError` to only proceed with the second
try if the retyped argument trees are error free.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
SI-8292 report error when scaladoc fails to find doclet.
|
| | |_|_|_|/
| |/| | | | |
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
SI-8690 BufferedSource.mkString mistakenly skipped the first char.
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
mkString is overriden in BufferedSource for performance, but the
implementation always used the wrong reader. This seems to be a typo
(`allReader` is declared 5 lines earlier but never used, `charReader`
is used in its place).
|
|\ \ \ \ \
| | | | | |
| | | | | | |
adds MacroPlugin.pluginsIsBlackbox
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This is an important omission in the current macro plugin API, which was
designed before the blackbox vs whitebox separation was implemented.
Even if one overrides pluginsTypedMacroBody and pluginsMacroExpand,
that would still be not enough to write a custom macro expander, because
typedImplicit1 uses isBlackbox, which is tightly coupled with the standard
way of reading/writing macro signatures.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
macro args now correctly preserve range positions
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Somewhen in the 2.11.0 development cycle we started duplicating macro arguments
for increased robustness. What wasn't taken into account though is that
Tree.duplicate destroys range positions. This commit fixes the problem.
2.10.x is unaffected by this bug, because it doesn't duplicate the args yet.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
SI-7562 Regex.findAllIn does not report all matches
|
| | |_|_|_|/
| |/| | | |
| | | | | |
| | | | | | |
Changed findAllIn docs to clarify that it finds non-overlapping matches.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
SI-8657 don't miss tailrec defs in more positions
|
| | |_|/ / /
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
1) First operand of boolean expression using `&&` or `||`. Second operands of
those boolean exprs were already treated specially here but handling for first
operands was missing.
2) Condition of `If`. Also added a test for guards.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
SI-8185 Correct grammar for single-warning compilation run
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| |_|_|/ / / /
|/| | | | | | |
SI-7372 fix wrong insertion point for binary & linear search.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The public facing binarySearch method used an inclusive 'from'
parameter, while the internal @tailrec one used an *exclusive*
'from' parameter. No wonder there was an off-by-one error somewhere.
This makes both methods use the same exclusive 'from' parameter.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
It should return the position the value would have if it was a part of
the sequence. Somehow even the test was wrong.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-6967 Fix ClassTag unapply for primitives
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This commit fixes the behavior of ClassTag's Any-accepting unapply
overload. Previously, ClassTag had overloads of unapply that accepted
all of the Java primitive aliases (language-supported magic classes
extending AnyVal), as well as an implementation that accepted an Any.
All of the AnyVal-accepting (more specific) versions of the methods
worked correctly. However, the Any-accepting version incorrectly handled
these types. For example, ClassTag.Int.unapply(3) would return Some(3)
(through the Int-accepting overload), while ClassTag.Int.unapply(3: Any)
would return None (through the Any-accepting overload). This commit
unifies these behaviors, making ClassTag.Int.unapply(3: Any) return
Some(3). It accomplishes this by adding a pattern match on the type of
that method's argument, which will delegate to one of the
more-specifically-typed overloads if possible. It also improves the
formatting of the code a bit.
One thing to note (though I doubt anyone will ever do this based on this
message) is that the AnyVal-subtype-accepting overloads should be
removed in Scala 2.12, as they are unneeded. I placed a note to this
effect into the code.
|
|\ \ \ \ \ \ \ \
| |_|_|_|/ / / /
|/| | | | | | | |
SI-6409 Stream flatMap leaks memory if mapper returns many empties
|
| |/ / / / / /
| | | | | | |
| | | | | | |
| | | | | | | |
Added Scaladoc explaining that this is necessary behavior, but closed ticket as wontfix.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-8672 Better end-of-sentence detection for Scaladoc
|
|/ / / / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The first sentence of a Scaladoc comment is parsed as the summary.
However, this was breaking of the sentence at the first `.`, even
if that was immediately followed by another character.
This commit only considers a period followed by whitespace, EOL or
EOF as the end of a sentence.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-8631 Treat `A with Sealed` as enumerable for pattern matching
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
It arrived in c1f8dbc, but is no longer needed after user-defined
value classes were introduced in 2.10.0.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
- reorder to make "unenumerable" the last case
- reunite an orphaned comment with its loved ones.
|