| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Hmmm, the giant blob of binary data embedded in a test
suddenly stopped working. What does one do in this spot.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Can hardly believe this has been broken for a decade or so, but
there it is - see test case. Four classes attempt to set their
SerialVersionUID to 13. One succeeds. No warnings or errors. The
output before this patch (for me anyway - your random numbers may
differ) was:
860336111422349646
13
8409527228024057943
-7852527872932878365
There was already code in place for rejecting annotations
with non-constant args when constant args are required, but
that check is only performed on ClassfileAnnotations, and
SerialVersionUID was a StaticAnnotation. Maybe people don't
reach for ClassfileAnnotation because of this giant warning
which I see no way to suppress:
warning: Implementation restriction: subclassing Classfile does
not make your annotation visible at runtime. If that is what you
want, you must write the annotation class in Java.
Why did I change the name of the field from uid to value?
If you don't use the name 'value', you have to name the argument
every time you use it, even if it's the only parameter. I didn't
relish breaking every usage of scala's @SerialVersionUID in the
known universe.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* merge-2.10.wip-x: (24 commits)
SI-6023 reify abstract vals
Removing controversial `either` method from Futures API.
SI-6695 Test case for fixed Array match bug
adds comments to standard attachments
SI-6673 fixes macro problems with eta expansions
Restore the opimization apparently lost after merge.
SI-6624 set info of case pattern binder to help find case field accessors
Scaladoc update for collection.mutable.MultiMap
SI-6663: don't ignore type parameter on selectDynamic invocation
SI-6551: don't insert apply call in polymorphic expression.
SI-6634 Fixes data corruption issue in ListBuffer#remove
Fixes SI-6628, Revert "Fix for view isEmpty."
SI-6661 - Remove obsolete implicit parameter of scala.concurrent.promise method
Fixes SI-6150 - backport to 2.10.x branch.
SI-5330, SI-6014 deal with existential self-type
Fixes SI-6559 - StringContext not using passed in escape function.
SI-6648 copyAttrs must preserve TypeTree#wasEmpty
Fix raw string interpolator: string parts which were after the first argument were still escaped
sane printing of renamed imports
SI-6440 Address regressions around MissingRequirementError
...
Conflicts:
src/library/scala/collection/generic/IndexedSeqFactory.scala
src/library/scala/collection/mutable/ListBuffer.scala
src/reflect/scala/reflect/internal/Symbols.scala
src/reflect/scala/reflect/internal/Types.scala
test/files/run/t6150.scala
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
# By Jason Zaugg (8) and others
# Via Adriaan Moors (6) and Josh Suereth (5)
* origin/2.10.0-wip:
Removing controversial `either` method from Futures API.
SI-6624 set info of case pattern binder to help find case field accessors
Fixes SI-6628, Revert "Fix for view isEmpty."
SI-6661 - Remove obsolete implicit parameter of scala.concurrent.promise method
Fixes SI-6559 - StringContext not using passed in escape function.
SI-6648 copyAttrs must preserve TypeTree#wasEmpty
Fix raw string interpolator: string parts which were after the first argument were still escaped
Update comment.
SI-6646 `ident` or Ident is always new binding.
SI-6440 Address regressions around MissingRequirementError
Refine the message and triggering of MissingRequirementError.
SI-6640 Better reporting of deficient classpaths.
SI-6644 Account for varargs in extmethod forwarder
SI-6646 Fix regression in for desugaring.
Update tools/epfl-publish
|
| | |\
| | | |
| | | | |
SI-6640 Better reporting of deficient classpaths.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Go back to using globalError to report when a stub's info is referenced,
and only throw the MissingRequirementError when compilation really
must abort due to having a StubTermSymbol in a place where a
StubClassSymbol would have been a better choice.
This situation arises when an entire package is missing from the
classpath, as was the case in the reported bug.
Adds `StoreReporterDirectTest`, which buffers messages issued
during compilation for more structured interrogation. Use this
in two test for manifests -- these tests were using a crude means
of grepping compiler console output to focus on the relevant output,
but this approach was insufficient with the new multi-line error
message emitted as part of this change.
Also used that base test class to add two new tests: one for
the reported error (package missing), and another for a simpler
error (class missing). The latter test shows how stub symbols
allow code to compile if it doesn't the subset of signatures
in some type that refer to a missing class.
Gave the INFO/WARNING/ERROR members of Reporter sensible
toString implementations; they inherit from Enumeration#Value
in an unusual manner (why?) that means the built in toString of
Enumeration printed `Severity@0`.
|
| | |\ \
| | | | |
| | | | | |
SI-6624 better lookup of case field accessors for case class pattern with complicated type
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
sometimes the type checker infers a weird type for a sub-pattern of a case class/extractor pattern
this confuses the pattern matcher and it can't find the case field accessors for the sub-pattern
use the expected argument type of the extractor corresponding to the case class that we're matching
as the info for the sub-pattern binder -- this type more readily admits querying its caseFieldAccessors
|
| | |\ \ \
| | | | | |
| | | | | | |
Fixes SI-6628, Revert "Fix for view isEmpty."
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This reverts commit caf7eb6b56817fd1e1fbc1cf017f30e6f94c6bea.
I don't have a better idea right now than wholesale reversion.
|
| | |\ \ \ \
| | | | | | |
| | | | | | | |
SI-6559 Fix raw string interpolator: string parts which were after the first argument were still escaped
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
As reported by Curtis Stanford, with indication of what to fix. standardInterpolator was not correctly
calling the passed in process function, so raw strings were not really raw.
|
| | | | |_|/
| | | |/| |
| | | | | |
| | | | | | |
argument were still escaped
|
| | |\ \ \ \
| | | |_|/ /
| | |/| | | |
SI-6648 copyAttrs must preserve TypeTree#wasEmpty
|
| | | |/ /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This field tracks whether the type is an inferred
on, subject to removal in `resetAttrs`, or an explicit
type, which must remain.
In ae5ff662, `ResetAttrs` was modified to duplicate
trees, rather than mutate trees in place. But the
tree copier didn't pass `wasEmpty` on to the new tree,
which in turn meant that the subsequent typing run
on the tree would not re-infer the types. If the
type refers to a local class, e.g. the anonymous
function in the enclosed test case, the reference
to the old symbol would persist.
This commit overrides `copyAttrs` in TypeTree to
copy `wasEmpty`.
We might consider representing this as a tree
attachment, but this would need to be validated
for the performance impact.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Type trees created by MethodSynthesis for abstract val getters carry symless originals,
which are unusable for reification purposes
(or the result of reification will be unhygienic).
To combat this, type trees for such getters are now created empty,
i.e. without any `tpe` set, just having an original assigned.
Subsequent `typedTypeTree` invocations fill in the `tpe` and
update the original to be symful.
|
| |\ \ \ \
| | | | | |
| | | | | | |
SI-6673 fixes macro problems with eta expansions
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Eta expansions previously caused the typer to disable macros. That was
done in order to detect eta expansion of macro defs and show the user
an appropriate error message.
Macros were disabled because to find out whether we're expanding
a macro def, we need to get its symbol, and to get a symbol of something
we need to typecheck that something. However typechecking automatically
expands macros, so, unless we disable macros, after a typecheck we won't
be able to analyze macro occurrences anymore.
Unfortunately this solution has a fatal flaw. By disabling macros we
not only prevent the eta-expandee from macro expanding, but also all
the subtrees of that eta-expandee (see SI-6673).
This commit adds a mechanism for fine-grained control over macro
expansion. Now it's possible to prohibit only the node, but not its
children from macro expanding.
|
| |\ \ \ \ \
| | | | | | |
| | | | | | | |
SI-6695 Test case for fixed Array match bug
|
| | | | | | | |
|
| |\ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-6632 SI-6633 Fixes issues and data corruption in ListBuffer
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
- Disallow negative positions for ListBuffer#insert/insertAll/update
- Fix data corruption issue in ListBuffer#insert
|
| |\ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
SI-6634 Fixes data corruption issue in ListBuffer#remove
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This is the cut-down version with minimally invasive changes,
e. g. keeping the "auto-correcting" bounds algorithm.
|
| |\ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Fixes SI-6551.
|
| | |/ / / / / / /
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Don't rewrite an explicit apply method to dynamic polytypes.
|
| |\ \ \ \ \ \ \ \
| | |_|_|/ / / / /
| |/| | | | | | | |
Si 6663 2.10.x fix type parameter on selectDynamic
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Fix mkInvoke to handle selectDynamic calls of the form
new C.foo[T].xyz
or
new C.foo[T].xyz :U
(where C extends Dynamic)
Without this patch, the type parameter was silently ignored, and
possibly inferred to a different.
This patch fixes mkInvoke to handle these cases, where ctxTree has
the form Select(TypeApply(fun, targs), nme) or Typed(...)
|
| |\ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Fixes SI-6150 - backport to 2.10.x branch.
|
| | |/ / / / / / / |
|
| |\ \ \ \ \ \ \ \
| | |_|/ / / / / /
| |/| | | | | | | |
SI-5330, SI-6014 deal with existential self-type
|
| | |/ / / / / /
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This has been broken since https://github.com/scala/scala/commit/b7b81ca2#L0L567.
The existential rash is treated in a similar manner as in fc24db4c.
Conceptually, the fix would be `def selfTypeSkolemized =
widen.skolemizeExistential.narrow`, but simply widening before
narrowing achieves the same thing. Since we're in existential voodoo
territory, let's go for the minimal fix: replacing `this.narrow` by
`widen.narrow`.
--
Original patch by @retronym in #1074, refined by @paulp to
only perform widen.narrow incantation if there are
existentials present in the widened type, as
narrowing is expensive when the type is not a singleton.
The result is that compiling the entirety of quick, that
code path is hit only 143 times. All the other calls hit
.narrow directly as before. It looks like the definition
of negligible in the diff of -Ystatistics when compiling
src/library/scala/collection:
< #symbols : 306315
---
> #symbols : 306320
12c13
< #unique types : 293859
---
> #unique types : 293865
I'm assuming based on the 2/1000ths of a percent increase
in symbol and type creation that wall clock is manageable,
but I didn't measure it.
|
| |\ \ \ \ \ \ \
| | |/ / / / / /
| |/| | | | | | |
sane printing of renamed imports
|
| | | |/ / / /
| | |/| | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Having a select named "foo" with an underlying symbol named "bar"
and trying to make sense of all that by prettyprinting is very confusing
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-6448 Collecting the spoils of PartialFun#runWith
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Avoids calling both `isDefinedAt` and `apply`. This pathological
case that would benefit the most looks like:
xs collect {
case x if {expensive(); true} => x
}
The typical change looks like:
- for (x <- this) if (pf.isDefinedAt(x)) b += pf(x)
+ foreach(pf.runWith(b += _))
Incorporates feedback provided by Pavel Pavlov:
https://github.com/retronym/scala/commit/ef5430
A few more opportunities for optimization are noted in the
`Pending` section of the enclosed test. `Iterator.collect`
would be nice, but a solution eludes me.
Calling the guard less frequently does change the behaviour
of these functions in an obervable way, but not contravene
the documented semantics. That said, there is an alternative
opinion on the comment of the ticket:
https://issues.scala-lang.org/browse/SI-6448
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Added -Xdev setting... you know, for devs
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
A setting we developers can give all the time and expect to
hear useful things without being buried in debugging output.
As the comment says:
This is for WARNINGS which should reach the ears of scala
developers whenever they occur, but are not useful for normal
users. They should be precise, explanatory, and infrequent. Please
don't use this as a logging mechanism. !!! is prefixed to all
messages issued via this route to make them visually distinct.
This is what I always intended for "debugwarn", the method
I have deprecated in favor of the more accurate:
def devWarning(msg: => String): Unit
In this VERY SAME COMMIT, I performed the CLOSELY RELATED
task of quieting down an -Xlint warning which had become too
noisy thanks to implicit classes tickling it. I tightened that
warn condition to include both -Xlint and -Xdev.
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Fix for SI-6357, cycle with value classes.
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Don't force the owner info.
|
|\ \ \ \ \ \ \ \ \ \
| |_|/ / / / / / / /
|/| | | | | | | | | |
Optimize primitive Array(e1, ..., en)
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Expands an existing optimization for reference arrays to
apply to primitives, as well.
Fixes one aspect of SI-6247.
|
|\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
Merge 2.10.0-wip/.x into master
|
| | \ \ \ \ \ \ \ \ \ | |
| | \ \ \ \ \ \ \ \ \ | |
| |\ \ \ \ \ \ \ \ \ \ \
| | |_|_|/ / / / / / / /
| |/| | | | / / / / / /
| | | |_|_|/ / / / / /
| | |/| | | | | / / /
| | | | |_|_|_|/ / /
| | | |/| | | | | | |
master
Conflicts:
src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala
|
| | | |\ \ \ \ \ \ \
| | | | |_|_|_|_|_|/
| | | |/| | | | | | |
SI-6644 Account for varargs in extmethod forwarder
|
| | | | | |_|_|_|/
| | | | |/| | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Which sounded difficult, so instead I offshored the work
to the friendly republic of TreeGen.
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
The previous commit regressed in these cases:
// no withFilter
for (X <- List("A single ident is always a pattern")) println(X)
for (`x` <- List("A single ident is always a pattern")) println(`x`)
At the top level of the LHS of a <-, such identifiers represent
new bindings, not stable identifier patterns.
|
| | | |/ / / / /
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The early check in the parser of pattern irrefutability,
added in c82ecab, failed to consider InitCaps and
`backquoted` identifiers.
|
| | |\ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
SI-6539 Annotation for methods unfit for post-typer ASTs
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
- Don't default the message, and show it exclusively.
- Fix cut-and-pasto in the @since tag
- Be tolerant if the annotaion class is missing, as seems to
have been the case compiling the continuations plugin.
- s/\t/ / in the test file to show the errors are positioned
correctly.
- Use defensive getOrElse
|