| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Trait implementation classes and specialized classes are always
considered top-level in terms of the InnerClass / EnclosingMethod
attributes. These attributes describe source-level properties, and
such classes are a compilation artifact.
Note that the same is true for delambdafy:method closure classes
(they are always top-level).
|
|
|
|
|
|
|
|
|
|
| |
Private trait methods are not added to the generated interface, they
end up only in the implementation class. For classes nested in such
methods, the EnclosingMethod attribute was incorrect.
Since the EnclosingMethod attribute expresses a source-level property,
but the actual enclosing method does not exist in the bytecode, we
set the enclosing method to null.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change fixes both GenASM and GenBCode, except for the change
to renaming in LamdaLift mentioned below.
The reason for an inconsistent EnclosingMethod attribute was the
symbol owner chain. Initially, closure class symbols don't exist, they
are only created in UnCurry (delambdafy:inline). So walking the
originalOwner of a definition does not yield closure classes.
The commit also fixes uses of isAnonymousClass, isAnonymousFunction
and isDelambdafyFunction in two ways:
1. by phase-travelling to an early phase. after flatten, the name
includes the name of outer classes, so the properties may become
accidentally true (they check for a substring in the name)
2. by ensuring that the (destructive) renames during LambdaLift
don't make the above properties accidentally true. This was in
fact the cause for SI-8900.
|
|\
| |
| | |
Rewrite contrib guidelines: shorter & friendlier
|
| | |
|
| |
| |
| |
| | |
Lower friction some more (submit PR first, ask questions later!)
|
| |
| |
| |
| |
| |
| |
| | |
Refactored to be less "just do it this way",
and more "here's how you can contribute more effectively".
Tried to motivate requirements, strike lighter tone in general.
|
|\ \
| | |
| | | |
Update scala-partest dependency to 1.0.3
|
| | | |
|
|\ \ \
| | | |
| | | | |
Patch 1 - Scala doc improved
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Reading this doc (having no code) can be ambiguous.
updated scala doc (overloaded sliding method)
Step is a method parameter and must be always given explicit, so info about default value is wrong.
|
|\ \ \ \
| | | | |
| | | | | |
SI-9135 Fix NPE, a regression in the pattern matcher
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The community build discovered that #4252 introduced the possibility
for a NullPointerException. The tree with a null type was a synthetic
`Apply(<<matchEnd>>)` created by the pattern matcher.
This commit adds a null check.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-6502 More robust REPL :require
|
| |\ \ \ \ \
| | | | | | |
| | | | | | | |
SI-6502 Convert test to asserts
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | | |
This saves a check file in the crowded test directory.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Before, we got in an endless loop if using ^D to try to end the
session. When piping commands into the REPL, this was rather annoying!
```
scala-hash v2.11.5
Welcome to Scala version 2.11.5-20150101-184742-3fafbc204f (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_25).
Type in expressions to have them evaluated.
Type :help for more information.
scala> :require xxx
java.lang.NullPointerException
at scala.tools.nsc.interpreter.ILoop.scala$tools$nsc$interpreter$ILoop$$flatten$1(ILoop.scala:651)
at scala.tools.nsc.interpreter.ILoop.require(ILoop.scala:654)
That entry seems to have slain the compiler. Shall I replay
your session? I can re-run each line except the last one.
[y/n]^D
You must enter y or n.
That entry seems to have slain the compiler. Shall I replay
your session? I can re-run each line except the last one.
[y/n]^D
...
```
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
- handle missing files gracefully (rather than NPE)
- read the class name with ASM, rather than with a dummy
classloader. The dummy classloader is prone to throwing
`LinkageError`s, as reported in the comments of SI-6502.
Manual test of the original report:
```
% qscala
Welcome to Scala version 2.11.5-20150115-183424-155dbf3fdf (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_25).
Type in expressions to have them evaluated.
Type :help for more information.
scala> :require does/not/exist
Cannot read: does/not/exist
scala> classOf[org.junit.Test]
<console>:8: error: object junit is not a member of package org
classOf[org.junit.Test]
^
scala> :require /Users/jason/.m2/repository/junit/junit/4.11/junit-4.11.jar
Added '/Users/jason/.m2/repository/junit/junit/4.11/junit-4.11.jar' to classpath.
scala> classOf[org.junit.Test]
res1: Class[org.junit.Test] = interface org.junit.Test
```
I have commited an automated test that is a minimization of this one.
|
|\ \ \ \ \ \
| |_|/ / / /
|/| | | | | |
SI-9086 Fix regression in implicit search
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Implicit search declines to force the info of candidate implicits
that either a) are defined beyond the position of the implicit search
site, or b) enclose the implicit search site.
The second criterion used to prevent consideration of `O` in
the super constructor call:
implicit object O extends C( { implicitly[X] })
However, after https://github.com/scala/scala/pull/4043, the
block containing the implicit search is typechecked in a context
owned by a local dummy symbol rather than by `O`. (The dummy and
`O` share an owner.)
This led to `O` being considered as a candidate for this implicit
search. This search is undertaken during completion of the info of
`O`, which leads to it being excluded on account of the LOCKED flag.
Unfortunately, this also excludes it from use in implicit search
sites subsequent to `O`, as `ImplicitInfo` caches
`isCyclicOrErroneous`.
This commit adjusts the position of the local dummy to be identical
to that of the object. This serves to exclude `O` as a candidate
during the super call on account of criterion a).
|
|\ \ \ \ \ \
| |_|_|_|_|/
|/| | | | | |
SI-8976 MutableList.tail.iterator.size is length
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The previous behavior was to iterate over the mutated
list of arbitrary length. The previous iteration of
the iterator would also iterate the terminal element
of the list without halting.
This is fixed by capping the length of iterator.
That is OK because mutating the list by adding to it during
iteration is not recommended.
For good measure, the exhausted iterator does not hold
a reference to any remaining tail.
A test is added that will no doubt be superseded by the QCC tests.
(Quasi-Comprehensive Collections.)
The test just checks that the extra tail is not strongly
reachable from the iterator. If the garbage collector happens
to kick in and determine that the object is weakly reachable,
then the check terminates early.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Fix problems with a locale-dependent decimal mark in StringContextTest
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This commit corrects three tests which were failing for certain locale
due to the different decimal marks in the expected value and the
result (e.g. 2.50 and 2,50).
From now also the expected value is formatted in accordance with the
current locale.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-7770 mutable.BitSet.toImmutable isn't immutable
|
| | |_|_|_|_|/
| |/| | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Mark method as deprecated due to it not providing the expected result,
while fixing it will break existing code.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-9093 Fix value discarding / multiple param list crasher
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The type error stemming from missing argument list was being
swallowed when the expected type was `Unit` and there were
undetermined type parameters in the expression.
This commit modifies `adapt` to avoid using
`instantiateExpectingUnit` when the tree is typed with `MethodType`.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
SI-9050 Fix crasher with value classes, recursion
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
From the "Substitution is hard to do" department.
In 7babdab9a, TreeSymSubstitutor was modified to mutate the info
of symbols defined in the tree, if that symbol's info referred to
one of the `from` symbols in the substitution.
It would have been more principled to create a cloned symbol
with the updated info, and add that to the substitution. But I
wasn't able implement that correctly (let alone efficiently.)
The in-place mutation of the info of a symbol led to the crasher
in this bug: a singleton type over that symbol ends up with a stale
cached value of 'underlying'. In the enclosed test case, this leads
to a type error in the `SubstituteRecursion` of the extension
methods phase.
This commit performs a cleanup job at the end of `substituteSymbols`
by invalidating the cache of any `SingleType`-s in the tree that
refer to one of the mutated symbols.
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Document concurrent package object
|
| | |_|_|_|_|_|/ /
| |/| | | | | | | |
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
SI-9133 Harden against infinite loop in NoSymbol.owner
|
| | | | | | | | | | |
|
| | |_|_|_|_|_|_|/
| |/| | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
The available evidence gathered in an IDE hang suggests that
while editing erronenous code, a call to `Erasure#javaSig` by the
IDE's structure builder triggered the `ExplicitOuter` info transformer
on a symbol with some sort of incoherent owner chain, which led to
an infinite loop in `NoSymbol#outerClass`.
This commit hardens that method to work in the same manner as a call
to `NoSymbol.owner`: log the error under -Xdev or -Ydebug and return
return `NoSymbol` to soldier on without crashing / hanging.
I haven't formulated a theory about how we might have ended up with
the corrupt owner chain.
|
|\ \ \ \ \ \ \ \ \
| |/ / / / / / / /
|/| | | | | | | | |
SI-7623 Trailing sequence wildcard warning
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
An -Xlint:stars-align warning for the case of patterns
with at least one "fixed" component and a varargs component.
Warn if the fixed patterns don't exactly align with the fixed
value components, such that a sequence wildcard aligns exactly
with the varargs component (either a T* parameter in a case class
or a Seq[T] in an extractor result).
This addresses the case of the xml.Elem extractor, which does
not correspond to the Elem class constructor. One can be fooled
into supplying an extra field for extraction.
Vanilla extractors of type `Option[Seq[_]]` are unaffected by
this flag. It's OK to ask for `case X(a, b, c)` in the expectation
that three results are forthcoming. There is no semantic confusion
over where the varargs begin.
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
SI-9072 Vector ++ concatenation of parallel collection cause inconsisten...
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
results
|
|\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
Update scala version to 2.11.5 for Intellij 14
|
| | |_|_|_|_|_|_|_|/
| |/| | | | | | | | |
|
|\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
fix definition of TRY in the language specification
|
| | |/ / / / / / / /
| |/| | | | | | | | |
|
|\ \ \ \ \ \ \ \ \ \
| |_|/ / / / / / / /
|/| | | | | | | | | |
Update 03-types.md
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Using U_i instead of T_i is confusing. See http://stackoverflow.com/questions/26803244/is-this-a-typo-in-the-scala-language-specification-on-parameterized-types
|
|\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | | |
SI-8642 Enable OSGi tests under Java 8
|
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
We use the PAX Exam framework to integration test that the
OSGi metadata we add to our JARs allows them to be loaded
into the Felix and Equinox containers. However, we had to
disable this test under Java 8 due to an incompatibility between
that framework and the modern Java version.
I have found a combination that works in Java 6, 7, and 8,
so the test is now run under all Java versions.
I have left a `skip` property to disable them, following the
established convention.
Tip of the hat to:
- @soc / @rkrzewski for the work in #4066 that paved the way
for this small change
- Harald Wellman, for sharing [1] the Java 8 compatible combination
of PAX and Felix .
Testing:
```
for V in 1.6 1.7 1.8; do java_use $V; ant -q test.osgi; done
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-466.1-11M4716)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-466.1, mixed mode)
...
[echo] Running OSGi JUnit tests. Output in /Users/jason/code/scala3/build/osgi
[echo] Test pass 1 of 2 using Apache Felix 4.4.0
[echo] Test pass 2 of 2 using Eclipse Equinox 3.7.1
BUILD SUCCESSFUL
Total time: 31 seconds
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)
...
[echo] Running OSGi JUnit tests. Output in /Users/jason/code/scala3/build/osgi
[echo] Test pass 1 of 2 using Apache Felix 4.4.0
[echo] Test pass 2 of 2 using Eclipse Equinox 3.7.1
BUILD SUCCESSFUL
Total time: 22 seconds
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
...
[echo] Running OSGi JUnit tests. Output in /Users/jason/code/scala3/build/osgi
[echo] Test pass 1 of 2 using Apache Felix 4.4.0
[echo] Test pass 2 of 2 using Eclipse Equinox 3.7.1
BUILD SUCCESSFUL
Total time: 16 seconds
```
[1] https://groups.google.com/d/msg/ops4j/TN0sZFf6wLs/vUP0GML6-TQJ
|
|/ / / / / / / / / /
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
We can now edit these in IntelliJ, as per the regular JUnit tests.
|
|\ \ \ \ \ \ \ \ \ \
| |_|_|/ / / / / / /
|/| | | | | | | | | |
IMPORTANT: Base your PR on this one --> New PR validation <--
|
| | | | | | | | | | |
|