| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |\
| | |
| | | |
Improve type printing (toString/debugging)
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
More consistency as to how to understand aliases,
singletons, specialized symbols, subclasses. Fewer
weird special casings, like normalizing tuples
and functions during type printing, but nothing else.
I avoid "normalize" entirely now, and do not make
special cases for dealiasing, which is already well
handled when printing error messages.
Look at the change to test/files/neg/t2641.check to get
a sense of why we should resist calling normalize during
the early days of a compilation run.
Anonymous and refinement classes can be printed far more
usefully by revealing their parents, and that too is here.
Hardened toString against undesirable side effects.
Make toString final to discourage any further rogue
toString overriders. Make safeToString a little safer.
|
|\ \ \
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
bincompat-backward.whitelist.conf
bincompat-forward.whitelist.conf
src/compiler/scala/reflect/reify/phases/Reshape.scala
src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
src/compiler/scala/tools/nsc/transform/Mixin.scala
src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
src/compiler/scala/tools/nsc/typechecker/Typers.scala
src/library/scala/concurrent/impl/Promise.scala
src/reflect/scala/reflect/internal/StdAttachments.scala
test/files/neg/macro-override-macro-overrides-abstract-method-b.check
test/files/run/t7569.check
|
| |\ \
| | | |
| | | | |
Rename t7636-neg.check to the standard t7636.check.
|
| |/ /
| | |
| | |
| | | |
Not sure which partest bug allowed this, but the old name was wrong.
|
| |\ \
| | | |
| | | | |
SI-7455 Drop dummy param for synthetic access constructor
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Java synthesizes public constructors in private classes to
allow access from inner classes. The signature of
that synthetic constructor (known as a "access constructor")
has a dummy parameter appended to avoid overloading clashes.
javac chooses the type "Enclosing$1" for the dummy parameter
(called the "access constructor tag") which is either an
existing anonymous class or a synthesized class for this purpose.
In OpenJDK, this transformation is performed in:
langtools/src/share/classes/com/sun/tools/javac/comp/Lower.java
(Incidentally, scalac would just emits a byte-code public
constructor in this situation, rather than a private constructor /
access constructor pair.)
Scala parses the signature of the access contructor, and drops
the $outer parameter, but retains the dummy parameter. This causes
havoc when it tries to parse the bytecode for that anonymous class;
the class file parser doesn't have the enclosing type parameters
of Vector in scope and crash ensues.
In any case, we shouldn't allow user code to see that constructor;
it should only be called from within its own compilation unit.
This commit drops the dummy parameter from access constructor
signatures in class file parsing.
|
| |\ \ \
| | | | |
| | | | | |
SI-7636 Fix a NPE in typing class constructors
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
If we encountered an erroneous super call due to a
failure in parent type argument inference, we must
avoid inspecting the untyped children of erroneous
trees.
|
| |\ \ \ \
| | | | | |
| | | | | | |
SI-7687 Handle spaces in %COMSPEC% path in scala.bat.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Double quoted %COMSPEC% to allow for spaces in the path to the
default interpreter (cmd.exe or equivalent).
|
| |\ \ \ \ \
| | |/ / / /
| |/| | | | |
SI-7569 Fix end position in PostfixSelect tree
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
introduced in 5b54681: the end position of Postfix operators should
take the operator length into account.
review by @som-snytt
|
| |\ \ \ \
| | |/ / /
| |/| | | |
SI-7657 clarifies the "macro overrides method" rule
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Currently we allow macros to override non-abstract methods (in order
to provide performance enhancements such as foreach for collections),
and we also disallow macros to override abstract methods (otherwise
downcasting might lead to AbstractMethodErrors).
This patch fixes an oversight in the disallowing rule that prohibited
macros from overriding a concrete method if that concrete method itself
overrides an abstract method. RefCheck entertains all overriding pairs,
not only the immediate ones, so the disallowing rule was triggered.
Now macros can override abstract methods if and only if either the base
type or the self type contain a matching non-abstract method.
|
| |\ \ \
| | | | |
| | | | | |
SI-7336 Link flatMapped promises to avoid memory leaks
|
| | |/ / |
|
| |\ \ \
| | | | |
| | | | | |
SI-7265 General test for spec version
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The test for isJavaAtLeast uses the specification.version.
The method argument must have the form "major.minor".
The scaladoc is updated to reflect the new reality and a
test is added under junit.
Note that this implementation aims to be a simple
compromise between the functional and imperative camps,
that is, to be free of both closures and while loops.
And to elicit no cruft like regexes and wrappers for strings.
No doubt even more could be done in this department, but we
don't wish to spoil the fun on codegolf.stackexchange.com.
However, we might decide to sponsor a new site:
codereviewpingpong.com
For 2.10.x, javaSpecVersion is provided as a private member.
The active test is under `run` and the `junit` test must
bide its time in `pending`.
For 2.11, the private members can be public and the app test
replaced with the unit test.
|
| |\ \ \ \
| | | | | |
| | | | | | |
SI-7649 Fix positions for reshaped tag materializers
|
| | | |/ /
| | |/| |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Calls to `materializeClassTag[T]` are replaced during reification with
`implicitly[ClassTag[T]]` in the `reify` macro. This is done to avoid
referring to symbols in scala-compiler.jar. Class- and Type-Tag
materialization is treated in the same way.
This commit positions the replacement trees to avoid triggering
assertions under -Yrangepos.
|
| |\ \ \ \
| | | | | |
| | | | | | |
fix typo in BigInt/BigDecimal deprecation messages
|
| | |/ / / |
|
| |\ \ \ \
| | | | | |
| | | | | | |
SI-7617 typedAssign no longer expands lhs
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This makes sure that setter and updateDynamic macros work as intended
rather than in some cases expanding incorrectly or prematurely.
Setter invocations are desugared from assignments of values to getters.
If a typecheck of an assignment's lhs yields an invocation of a getter,
then the assignment is rewritten into an invocation of a setter. However
if a getter is a macro, then it just expands, destroying the prerequisite
for desugaring. Therefore we need to disable expansion for the typecheck
of an lhs.
Similar thing happens to updateDynamic that first desugars a getter
invocation into q"$target.updateDynamic($fieldName)" and then expects
typedAssign to rewrite the corresponding Assign node into an additional
application of a partially applied updateDynamic to a rhs. Here we also
need to disable the typecheck of an lhs, because macros cannot be
partially applied.
|
| | | | | | |
|
| |\ \ \ \ \
| | |_|/ / /
| |/| | | | |
SI-7638 Superaccessor lookup after specialization
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The crash was caused by a symbol lookup to rewire the super calls,
done after pickler, but specialization added new traits and new
members, thus making the super rewiring impossible. To avoid such
problems, this patch moves symbol lookup after specialization,
so the changes done by specialization (and miniboxing) become
visible to mixin.
NOTE: This patch will be followed by a similar patch to master.
Review by @adriaanm or @retronym.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-7668 Better return type inheritance for dep. method types
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Return type inheritance already handles substitution of
type parameters of the overriding method for those of the
overriding.
This commit extends this to do the same for parameter symbols.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
SI-7669 Fix exhaustivity warnings for recursive ADTs.
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The pattern matcher's analysis was correctly finding
models under which the match in the enclosed test
could fail. But, when trying to render that model
as a counter example, it ran into an internal inconsistency
and gave up.
That inconsistency arose from VariableAssignment, which:
> turn the variable assignments into a tree
> the root is the scrutinee (x1), edges are labelled
> by the fields that are assigned a node is a variable
> example (which is later turned into a counter example)
In the process, it notes the unreachable case `V2 = NotHandled`,
which can only arise if `V1 = Op`, ie the scrutinee is `Op(NotHandled())`.
V2 is assosicated with the path `x1.arg`. The code then looked for
any variable assosicated with the prefix `x1` and registered that its
field `arg` was assosicated with this variable assignment.
However, the assignment for `V1 = NotHandled` (another missing case)
is also associated with the path `x1`. Registering this field makes
no sense here; we should only do that for `Op`.
This commit conditionally registers the fields based on the class
of `VariableAssignment#cls`. We no longer hit the inconsistency in
`VariableAssignment#allFieldAssignmentsLegal`.
This favourably changes the results of two existing tests.
I had to tweak the counter example pruning to avoid relying on
CounterExample.==, which is flaky in the light of Nil and List().
It is possible to have:
A, B where A != B && A.coveredBy(B) && B.coveredBy(A)
Luckily it is straightforward to implement pruning entirely with
coveredBy.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
SI-7620 Remove floating-point-literals-without-digit-after-dot
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-6811 Deprecate scala.text
|
| | |/ / / / /
| |/| | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-7592 Deprecate s.c.m.DefaultMapModel
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
“This class is used internally.” — No, it isn't.
It isn't used anywhere else either and it doesn't add much benefit,
considering that it lacks documentation and has no tests at all.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
SI-7679 Remove deprecated StandardScalaSettings#make
|
| |/ / / / / / / |
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
SI-7681 Remove dead code in s.t.n.s.AbsScalaSettings
|
| |/ / / / / / / |
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
SI-7681 Remove Phases, clean up TableDef
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
... now that scala.tools.nsc.Phases is gone.
|
| |/ / / / / / / |
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
SI-7681 Remove s.t.n.d.Changes (dead code)
|
| |/ / / / / / / |
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
SI-7689 Fix typing regression with default arguments
|