| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |\
| | |
| | | |
Ignore OpenJDK warnings in partest filters
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When running a 2.11.x validation on JDK 8, there are OpenJDK
warnings that fail tests. Backports a part of 8d2d3c70 to 2.11.x.
The missing filter causes merge commits to fail in PRs that merge
2.11 to 2.12, e.g., https://github.com/scala/scala/pull/4655.
In the future we probably want to trigger an integration build for
merge commits, but this doesn't happen yet AFAICT.
|
| |\ \
| | |/
| |/| |
bump copyright year to 2015
|
| | |
| | |
| | |
| | |
| | | |
(just hitting the highlights here, not worrying yet about bumping the
dates in every modified source file)
|
|\ \ \
| | | |
| | | | |
Align noTraceSuppression val names to system property name
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
For vals based on the scala.control.noTraceSuppression system property
align the val name to the property name.
Deprecate the existing val.
|
|\ \ \ \
| | | | |
| | | | | |
remove temporary XML coalescing hack we used to build M2
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
scala-xml 1.0.5 has the fix we need in order to run the scala-xml
tests normally during bootstrapping.
reverts 83554a3c0fb2b57efa293efcc81a947b98a19469
|
|\ \ \ \
| | | | |
| | | | | |
SI-9393 fix modifiers of ClassBTypes for Java annotations
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Adds query methods to the public reflection API for querying the
JAVA_ENUM and JAVA_ANNOTATION flags.
Didn't include JAVA_DEFAULTMETHOD because it does not correspond
to a real java classfile flag (just a non-abstract method in an
interface), and we want to clean the usage of this flag before adding
it to a public API.
The flags themselfs are not added to the reflection API. A comment in
api/FlagSets.scala says:
Q: I have a pretty flag. Can I put it here?
A: Only if there's a tree that cannot be built without it.
If you want to put a flag here so that it can be tested
against, introduce an `isXXX` method in one of the api.Symbols
classes instead.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Similar to the new JAVA_ANNOTATION flag, be more explicit about flags
for java entities.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The Scala classfile and java source parsers make Java annotation
classes (which are actually interfaces at the classfile level) look
like Scala annotation classes:
- the INTERFACE / ABSTRACT flags are not added
- scala.annotation.Annotation is added as superclass
- scala.annotation.ClassfileAnnotation is added as interface
This makes type-checking @Annot uniform, whether it is defined in Java
or Scala.
This is a hack that leads to various bugs (SI-9393, SI-9400). Instead
the type-checking should be special-cased for Java annotations.
This commit fixes SI-9393 and a part of SI-9400, but it's still easy
to generate invalid classfiles. Restores the assertions that were
disabled in #4621. I'd like to leave these assertions in: they
are valuable and helped uncovering the issue being fixed here.
A new flag JAVA_ANNOTATION is introduced for Java annotation
ClassSymbols, similar to the existing ENUM flag. When building
ClassBTypes for Java annotations, the flags, superclass and interfaces
are recovered to represent the situation in the classfile.
Cleans up and documents the flags space in the area of "late" and
"anti" flags.
The test for SI-9393 is extended to test both the classfile and the
java source parser.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-8911 allow serializing Scala Maps wrapped as Java ones
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Added `with Serializable` to `MapWrapper` and `SetWrapper`.
Test verifies that serialization works in the simplest case.
Also updated tests in t8549 to check that serialization works and doesn't change.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
SI-9408 Avoid capturing outer class in local classes.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Previously, only local classes declared final would be candidates
for outer pointer elision in the constructor phase.
This commit infers finality of local classes to expand the scope
of this optimization.
== Background ==
This was brought to our attention when shapeless enabled
indylambda and found that a hitherto serializable
data structure started to capture the enclosing class and hence
lost its serializability.
class NotSerializable {
def test = () => {
class C; assertSerializable(new C)
}
}
Under `-Ydelambdafy:inline`, it used to capture the enclosing anon
function class as its outer, which, being final, didn't in turn
capture the enclosing class.
class NotSerializable {
def test = new anonFun$1
}
class anonFun$1 {
def apply = assertSerializable(new C(this))
}
class ...$C(outer$: anonFun)
indylambda perturbs the enclosing structure of the function body.
class NotSerializable {
def anonFun$1 = {class C; assertSerializable(new C()))
def test = lambdaMetaFactory(<<anonFun$1>>)
}
Which leads to:
class NotSerializable$C(outer$: NotSerializable)
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
- Check if the clazz that owns all the decls we're filtering is
effectively final once, rather than for each decl.
- Query the full set of decls once.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Using the same facility that we use to record subclasses of
sealed classes, record the subclasses of term-owned ("local")
classes.
I have changed existing callers of `children` to use `sealedChildren`
so we don't start using this new information in pattern matching
and type pattern checkability analysis.
The following commit will build on this to infer finality of local
classes in the context of outer pointer elision in the constructors
phase.
|
|\ \ \ \ \ \ \
| |/ / / / / /
|/| | | | | | |
Merge 2.11.x to 2.12.x [ci: last-only]
|
|/| | | | | |
| | |_|_|/ /
| |/| | | |
| | | | | | |
merge/2.11.x-to-2.12.x-20152307
|
| |\ \ \ \ \
| | | | | | |
| | | | | | | |
SI-8502 create PackageClass instead of Class symbol stubs for pkgs
|
| | | |_|_|/
| | |/| | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
https://github.com/scala/scala/pull/4111 creates a stub type symbol
for missing packages, deferring (or avoiding) a crash if a package
is missing.
The symbol created was a ClassSymbol, which could lead to an assertion
failure in flattten:
case TypeRef(pre, sym, args) if isFlattenablePrefix(pre) =>
assert(args.isEmpty && sym.enclosingTopLevelClass != NoSymbol, sym.ownerChain)
`pre` is the stub ClassSymbol, so `isFlattenablePrefix` is true (but
it should be false). The assertion then fails because the enclosing
class of a top-level class defined in a missing package is NoSymbol.
This failed only with GenBCode, which traverses more of the symbol
graph while building ClassBTypes: it looks collects the nested classes
of `Outer` into a `NestedInfo`.
|
| |\ \ \ \ \
| | | | | | |
| | | | | | | |
Fix 23 typos (t-v)
|
| | | | | | | |
|
| |\ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Fix 6 typos (w-z)
|
| | | |/ / / /
| | |/| | | | |
|
| |\ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Fix typo in val name
|
| | |/ / / / / |
|
| |\ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Improve some names (t-v)
|
| | | |/ / / /
| | |/| | | | |
|
| |\ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-9409 Scaladoc: remove link to nonexistent diagram doc
|
| | | |/ / / /
| | |/| | | | |
|
| |\ \ \ \ \ \
| | |/ / / / /
| |/| | | | | |
SI-9406 fix doc for Range.takeRight
|
| |/ / / / / |
|
| |\ \ \ \ \
| | | | | | |
| | | | | | | |
SI-9370 Xplugin scans plugin path for descriptor
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Keep on scanning if the first entry doesn't yield
a plugin.xml descriptor.
|
| |\ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Update scaladoc for Any.scala#equals()
|
| | | |/ / / /
| | |/| | | |
| | | | | | | |
The transitive requirement for `Any` shouldn't mention `AnyRef`
|
| |\ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-9401 Avoid SOE with array + missing classtag
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The implicit classtags required by the Array constructor are not
expressed in the type signature of its constructor, and instead
are summoned by a special case in the typechecker.
This special case entails replacing the `new Array` tree with
`implicitly[T].newArray(size)`, handled in `ArrayInstantiation`.
This tree is recursively typechecked.
However, if the implicit materialization/search fails, an error
is issued to the current reporter and the original tree is marked
with an error type. As above, this is recursively typechecked.
In the normal course of affairs, the recursive typecheck of the
erroneous tree would be a noop (the tree already has a type!).
However, if we are both in silent mode (in which errors are buffered)
and in retyping mode (in which the typer clears the type and symbols
of trees), we were getting into an cycle.
In the enclosed test, retyping mode was trying to recover
from:
Resetting.this.gencastarray_=(new Array[T](0).<ERROR>)
By inserting a suitable a view:
implicitly[Resetting => { def gencastarray_=(AT)}](
Resetting.this
).gencastarray_=(new Array[T](0))
Where AT is the type found by retypechecking the argument.
It is during the argument retypechecking that we fell into cycle.
Crazily enough, in 2.11.0, the ensuing `StackOverflowError` was
being caught and treated as a failure. We would then back out of
the retyping mode, and issue the error from the the very first attempt
at the implicit search.
This fragile state of affairs was disrupted by a refactoring to
the error reporting system in 725c5c9, after which the SOE crashed
the compiler.
This commit avoids recursively typechecking error typed trees.
|
| |\ \ \ \ \ \ \
| | |/ / / / / /
| |/| | | | | | |
SI-8744 fix version.number in scaladoc.properties
|
| | |/ / / / /
| | | | | | |
| | | | | | |
| | | | | | | |
the fix is as suggested by Adriaan in the ticket
|
| |\ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
use newer Redcarpet to build spec
|
| | |/ / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
now that https://github.com/vmg/redcarpet/issues/494 is fixed
we don't need to stay pinned to an outdated version anymore
|
| |\ \ \ \ \ \
| | |/ / / / /
| |/| | | | | |
opt-in to Travis's newer/faster container-based infrastructure
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | | |
this is the way Travis is headed, so let's get on board
|
|\ \ \ \ \ \
| |_|_|_|/ /
|/| | | | | |
remove legacy bincompat stuff in two places
|
| | |_|_|/
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
it was only there to preserve binary compatibility within
the 2.11.x series
includes updated partest, since the old partest ran afoul
of the Stream change
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
SI-9383 Improved unused import warning
|