| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This is the change which broke the compiler until I made the
changes found in 693ecffbaf.
|
|\
| |
| | |
Updating Position call sites.
|
| |
| |
| |
| |
| |
| | |
Calling position factories rather than instantiating these
particular classes. Not calling deprecated methods. Added a few
position combinator methods.
|
|\ \
| | |
| | | |
transformers no longer ignore UnApply.fun
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Centralizes wrappers in a single location and makes it impossible to use
the compiler without going through that location.
Also fixes the option string tokenization bug that was there for ages.
This time I figured out that there's already an implementation of the
tokenizer in our compiler, so I just used it :)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Second time's the charm. I remember trying to do exactly the same somewhen
around 2.10.0-M4, but then some continuations tests were failing.
Luckily, today everything went smoothly.
Please note that this fix changes the way that SI-5465 manifests itself.
Previously it produced type errors, now it simply crashes the compiler.
Therefore I had to attach the try/catch FatalError clause to invocations
of toolbox methods, so that compiler crashes get caught and translated to
ToolBoxErrors.
Also fixes SI-7871, and that clears the way for implementing quasiquotes
with conventional macros rather than relying on a special case in typer.
|
| |/
|/|
| |
| |
| |
| |
| | |
I had covered a few more cases working on this recently.
The warnings in several more cases involving polymorphism,
currying, and selects vs. idents receive more refined
handling.
|
|\ \
| | |
| | | |
SI-7629 Deprecate view bounds
|
| |/
| |
| |
| |
| |
| | |
This introduces a warning(/error with -Xfuture) with a general
migration advice. The IDE can use the warning to offer a quick fix
with the specific refactoring necessary.
|
|\ \
| | |
| | | |
Only look for unapplies in term trees
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since Scala 2.10.2, the enclosed test case has crashed
in the backend. Before, we correctly rejected this pattern match.
My bisection landed at a merge commit f16f4ab157, although both
parents were good. So I don't quite trust that.
I do think the regression stems from the changes to allow:
case rx"AB(.+)" =>
Examples of this are in run/t7715.scala.
This commit limits the search for extractors to cases where the
function within the Apply is a term tree.
|
|\ \
| | |
| | | |
SI-7848 Xlint no warn on $sym with params
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This idea brought to you by retronym.
Also improve implicitNotFound detection at typer;
and avoid checking the standard interpolation
expression for cases like s"some $$x".
Some minor refactorings of implicitNotFound strings.
The intersobralator allows extra spaces, i.e., trims.
|
|\ \ \
| | | |
| | | | |
SI-3971 error message carat mispoints at curried methods.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Point at the beginning of the first argument list when
reporting an error, as this is most easily associated with
the application taking place (which may involve multiple
applies in succession.)
Thanks to retronym for figuring out why issuing a better
error message broke the compiler on non-erroneous compile runs.
The changes to "treesInResult" are the consequence.
|
|\ \ \ \
| | | | |
| | | | | |
SI-6120 multiple warnings at same position.
|
| |/ / /
| | | |
| | | |
| | | |
| | | | |
An error suppresses all further warnings at the same position,
but multiple warnings can be heard.
|
|\ \ \ \
| | | | |
| | | | | |
SI-6762 rename emptyValDef to emptySelfType.
|
| |/ / /
| | | |
| | | |
| | | |
| | | | |
Looks like emptyValDef.isEmpty was already changed to return
false, so now all that's left is a name which means something.
|
|\ \ \ \
| | | | |
| | | | | |
Fix up DEFAULTPARAM semantics.
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
I foolishly believed the deprecation message on "hasDefaultFlag"
which suggested I use "hasDefault" instead. After lots of head
scratching, I hardened the semantics so it's like this:
- A method parameter with a default value is PARAM | DEFAULTPARAM
- A default getter for such a parameter is METHOD | DEFAULTPARAM
- And "hasDefault" is has(DEFAULTPARAM) && has(PARAM | METHOD)
Why all the bonus logic, why not just hasFlag(DEFAULTPARAM)? For
some reason we have a handful of overloaded flags spanning uses
which someone apparently thinks can never intersect but I have
not been so lucky overall. So since DEFAULTPARAM is overloaded with
TRAIT, unless we think it's fine that default getters and method
parameters with defaults will pose as traits all the time, there
has to be an anchor bit alongside it.
|
|\ \ \ \
| | | | |
| | | | | |
Small refactorings giving hooks for Scala.js
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Other methods taking the same kind of decisions were already
in ClassPathContext, e.g., isValidName() or, in some sense,
even toBinaryName().
This makes ClassPath itself be completely agnostic of how
particular kinds of files or directories are named.
It also allows to override this logic at the context level.
Without it, overriding this logic required a fair amount of
code duplication from ClassPath.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This was previously an overridable method of Platform.
The loader creation was moved in
afbee09c8e0e7b1a4da1f8517c723dad9f1adb6f directly in
SymbolLoaders, but inside a method doing more logic,
namely initializeFromClassPath().
This commit simply moves the actual creation of the
class loader (`new ClassfileLoader(bin)`) into its
own method `newClassLoader`, but in SymbolLoaders.
This allows to override only that method in subclasses
of SymbolLoaders.
|
|\ \ \ \ \
| |_|/ / /
|/| | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Conflicts:
bincompat-backward.whitelist.conf
bincompat-forward.whitelist.conf
build.xml
src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
src/library/scala/concurrent/Future.scala
src/reflect/scala/reflect/internal/Types.scala
|
| |\ \ \ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Callbacks internal to the implementation of Futures should be
executed with the `InternalCallbackExecutor`, rather than the
user supplied `Executor`.
In a refactoring da54f34a6, `recoverWith` and `flatMap` no longer
played by these rules. This was noticed by a persnickety test in
Play.
Before this patch, the enclosed test outputs:
% scala-hash v2.10.3-RC2 test/files/run/future-flatmap-exec-count.scala
mapping
execute()
flatmapping
execute()
execute()
recovering
execute()
execute()
|
| |\ \ \ \ \
| | |/ / / /
| |/| | | | |
SI-7815 Dealias before deeming method type as dependent
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
To enable eta-expansion of method types seen from a prefix that
renders the result type as independent from the parameter symbols.
The enclosed test shows that we dealias types before checking
dependence, and that we do this deeply (e.g. type arguments are
also dealised.)
An existing test, neg/error_dependentMethodTpeConversionToFunction,
confirms that bona-fide dependent methods are still prohibited from
eta expansion.
|
| |\ \ \ \ \
| | | | | | |
| | | | | | | |
SI-7825 Consider DEFAULTMETHOD when refchecking concreteness
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
A class should not be required to implement a Java default method.
This commit uses `isDeferredNotDefault` in place of `isDeferred`
when finding unimplemented methods.
The test itself does not depend on Java 8 as we use scalac's
Java source parser to set things up.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-7870 Detect default getter clashes in constructors
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Default getters for constructors live in the companion module.
These eluded the check for clashes in default getter names due
to overloading, which aims to give a more user friendly error
than "double definition: meth$default$1".
This commit checks for default getters in the companion module,
in addition to those in the template itself.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Scaladoc regression with Function / Tuple type constructors
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Scaladoc renders tuple and function types with the syntactic sugar.
To do so, it was using `isFunctionType` and `isTupleType`. Internally,
these methods dealias, so one can't simply take the type arguments
from the given type to get the element types of the tuple.
In ac96200c92, a Scaladoc crasher in this area was resolved by
normalizing a type before extracting Tuple type arguments.
Similar code already existed in the handling of FunctionTypes.
This commit goes in the opposite direction, and instead queries
the `direct` versions of those methods, which do not perform
dealiasing.
Conseqeuently, the type aliases that appear in the source code
signatures for members will be rendered as such in Scaladoc.
Which seems like an improvement.
|
| | |_|_|_|_|_|/
| |/| | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
`isFunctionType` and `isTupleType` started returing true for
type constructors as of aeb73314. This led to a crash in type
printing in ScalaDoc (specfically, in ModelFactoryTypeSupport.scala)
This commit:
- fixes those methods by guarding with !isHigherKinded
- unit tests said methods
- tests the reported crasher with a ScalaDoc test.
|
|/ / / / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Octal escape literals are deprecated and will be removed in the
next Scala version.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-4742 Make -Xcheckinit aware of constants.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Members defined as `final val x = <literal>` are given
a ConstantType. The constant is folded into the accessor
method `x`, and the field itself is never initialized.
(Related discussion: SI-4605)
As such, -Xcheckinit spuriously warns when calling that
accessor.
This commit disables the checks for constants.
This will also fix the checkinit build (failure tracked as SI-7839),
which is the victim of this a spurious scolding.
|
|\ \ \ \ \ \ \ \
| |/ / / / / / /
|/| | | | | | | |
Revert #2957
|
| | |_|_|_|_|/
| |/| | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This reverts commit 884e1ce762d98b29594146d37b85384581d9ba96, reversing
changes made to f6fcc4431f272c707d49de68add532c452dd4b0f.
|
|\ \ \ \ \ \ \
| |/ / / / / /
|/| | | | | | |
SI-7868 Account for numeric widening in match translation
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Pattern match translation was unprepared for trees of the shape:
(0: Short) match {
case A.unapply(<unapply-selector>.toInt) <unapply> (_) => ()
case _ => ()
}
While a scrutinee is inelibigle for implicit views in order to
conform to the type of the extractor call, it is allowed to
weakly conform. In this case, the typechecker will add the
numeric widening with a `toInt` call.
This commit:
- Changes treeInfo.Unapplied to recognize this tree shape
- Changes spliceApply to recognize and preserve the widening
when substituting the unapply selector with the binder
- Tests reification of such pattern matches, which also depends
on treeInfo.Unapplied.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
SI-7725 - Vector concatenation is unreasonably slow
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Rewrote ++ to use append or prepend when adding small collections to the end
or beginning of vectors. This solves the extra-O(n) problem for addition of
single elements reported in SI_7725.
Renamed LgConcatFaster to Log2ConcatFaster (more widely recognizable).
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-7848 Xlint says what looks interpolated
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This idea brought to you by retronym.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Avoid extra work, extra warnings.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The motivating use case was an Expecty debug string
getting flagged for `$eq`.
The test case demonstrates a different bug, in which
the position of the literal tree is changed when typer
gets rid of the unused local, so that when the tree is
re-typed in erasure, a second, spurious warning is
emitted at the start of the method. Specifically, the
second warning is not suppressed because of the
different position.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Fix typo in documentation.
|