| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Allows a plugin to run before typer without incurring typechecking.
The test is that a plugin doesn't run when stopping after parser,
and that the truncated compilation run also succeeds, since
updating check files for the output of -Xshow-phases is tedious.
|
|\
| |
| | |
SI-7444 docs: null Executor allowed in ExecutionContext factories
|
| |
| |
| |
| |
| | |
Update the ScalaDoc for the factory methods for `ExecutionContext`
which allow a `null` `Executor`/`ExecutorService`.
|
|\ \
| | |
| | | |
SI-5639 Fix spurious discarding of implicit import
|
| | |
| | |
| | |
| | |
| | |
| | | |
To be conservative, I've predicated this fix in `-Xsource:2.12`.
This is done in separate commit to show that the previous fix
passes the test suite, rather than just tests with `-Xsource:2.12`.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In Scala fa0cdc7b (just before 2.9.0), a regression in implicit
search, SI-2866, was discovered by Lift and fixed. The nature of
the regression was that an in-scope, non-implicit symbol failed to
shadow an eponymous implicit import.
The fix for this introduced `isQualifyingImplicit` which discards
in-scope implicits when the current `Context`'s scope contains
a name-clashing entry.
Incidentally, this proved to be a shallow solution, and we later
improved shadowing detection in SI-4270 / 9129cfe9. That picked
up cases where a locally defined symbol in an intervening scope
shadowed an implicit.
This commit includes the test case from the comments of SI-2866.
Part of it is tested as a neg test (to test reporting of ambiguities),
and the rest is tested in a run test (to test which implicits are
picked.)
However, in the test case of SI-5639, we see that the scope lookup
performend by `isQualifyingImplicit` is fooled by a "ghost" module
symbol. The apparition I'm referring to is entered when
`initializeFromClassPath` / `enterClassAndModule` encounters
a class file named 'Baz.class', and speculatively enters _both_ a
class and module symbol. AFAIK, this is done to defer parsing the
class file to determine what inside. If it happens to be a Java
compiled class, the module symbol is needed to house the static
members.
This commit adds a condition that `Symbol#exists` which shines a torch
(forces the info) in the direction of the ghost module symbol. In our
test, this causes it to vanish, as we only need a class symbol for
the Scala defined `class Baz`.
The existing `pos` test for this actually did not exercise the bug,
separate compilation is required. It was originally checked in to
`pending` with this error, and then later moved to `pos` when someone
noticed it was not failing.
|
|\ \ \
| | | |
| | | | |
SI-6502 Reenables loading jars into the running REPL (regression in 2.10)
|
| | | |
| | | |
| | | |
| | | |
| | | | |
- Moves mergeUrlsIntoClassPath from Global into ClassPath
- Revises and documents AbstractFile.getURL
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fixes SI-6502, reenables loading jars into the running REPL
(regression in 2.10). This PR allows adding a jar to the compile
and runtime classpaths without resetting the REPL state (crucial
for Spark SPARK-3257).
This follows the lead taken by @som-snytt in PR #3986, which
differentiates two jar-loading behaviors (muddled by cp):
- adding jars and replaying REPL expressions (using replay)
- adding jars without resetting the REPL (deprecated cp,
introduced require) This PR implements require (left
unimplemented in #3986)
This PR is a simplification of a similar approach taken by
@gkossakowski in #3884. In this attempt, we check first to make
sure that a jar is only added if it only contains new
classes/traits/objects, otherwise we emit an error. This differs
from the old invalidation approach which also tracked deleted
classpath entries.
|
|\ \ \ \
| | | | |
| | | | | |
SI-8925, SI-7407 test cases, fixed in new backend
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Given that the issues are old (2.10) and we move to the new backend
in 2.12, I don't plan to fix them in GenASM.
The test case for 7407 existed already, this commit just adds
`-Yopt:l:none` to the flags to make no dead code is eliminated.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-8977 remove duplicate decoder.properties from scalap
|
| | |_|_|/
| |/| | |
| | | | |
| | | | |
| | | | | |
All .properties files in sources folder are already included in the
packed jar (see line 1028), so there is no need to add it again.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-8835 Iterator tests can be junit
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Addressing feedback from the collections test czar,
updated a few of the primitive tests. Avoided testing
addition and just asserted.
Updated indexOf test to test Iterator.indexOf.
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Without loss of generality or convenience, but helps
reduce the number of files in test/files and may reduce
compile times for test suite.
This commit includes the fix from #3963 and an extra
test of that fix that ensures the stack doesn't grow
on chained drops.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-8932 Fix dropRight/takeRight implementations
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
I looked up at all the overrides of `IterableLike#takeRight` and
`IterableLike#dropRight` and replaced usages of its argument `n` with
`math.max(n, 0)` every time it was being used in an index subtraction.
Fixes [SI-8932](https://issues.scala-lang.org/browse/SI-8932).
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Add curly brace (zero-or-more) in grammar for Bindings
|
| | | | | | |
| | | | | | |
| | | | | | | |
Missing closing curly brace as reported by Andre at https://groups.google.com/forum/#!topic/scala-language/4Zb6dc6EEFM.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-8449 Fix spurious error with Java raw type over a Scala class
|
| | |_|_|_|_|/
| |/| | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
When the Scala typechecker typechecks signatures in Java sources,
it must enable use of a type constructor without applied type
arguments (a raw type).
However, the check in `adaptType::properTypeRequired` was too
restricive: it only allows raw types given a) we are typechecking a
Java source file and b) the type constructor itself is Java defined.
The second check does not make sense; it is perfectly legal to define
a Java raw type for over a Scala defined type constructor. This commit
removes it.
The bug was noticed in the Scaladoc context, as it explores the
signatures of all Java sources so it can document them. But the
enclosed test demonstrates the underlying bug under normal
compilation.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-8534 Avoid crash in erroneous SelectFromTypeTree
|
| |/ / / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
PR #2374 changed the behaviour of `typedSingletonTypeTree` in the
presence of an error typed reference tree. It incorrectly
returns the reference tree in case on an error. However, this is
a term tree, which is an inconsistent result with the input type
tree. Consequently, a `typedSelectInternal` later fails when
using this as the qualifier of a `SelectFromTypeTree`.
Both test cases enclosed show this symptom.
This commit:
- Returns `tree` rather than `refTyped` when `refTyped` is
error typed or when it isn't suitable as a stable prefix.
- Avoids issuing a cascading "not a stable prefix" error if the
`refTyped` is error typed.
- Adds an extra layer of defense in `typedSelectFromTypeTree`
to bail out quickly if the qualifier is error typed.
The last measure is not necessary to fix this bug.
|
|\ \ \ \ \ \ \
| |_|/ / / / /
|/| | | | | | |
SI-8967 Only add JARs and dirs from $SCALA_HOME/lib to classpath
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
That's all we ship in that directory, but it seems that some
JVMs freak out with a core dump if something else ends up
in that directory and we add it to the boot classpath.
Testing on unix:
% rm ./build/pack/bin.complete; ant
% touch /Users/jason/code/scala/build/pack/lib/foo.txt
% mkdir /Users/jason/code/scala/build/pack/lib/dir
% bash -x ./build/pack/bin/scala -version
...
/Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home/bin/java -Xmx256M -Xms32M -Xbootclasspath/a:/Users/jason/code/scala/build/pack/lib/dir:/Users/jason/code/scala/build/pack/lib/jline.jar:/Users/jason/code/scala/build/pack/lib/scala-actors.jar:/Users/jason/code/scala/build/pack/lib/scala-compiler.jar:/Users/jason/code/scala/build/pack/lib/scala-continuations-library_2.11-1.0.2.jar:/Users/jason/code/scala/build/pack/lib/scala-continuations-plugin_2.11.2-1.0.2.jar:/Users/jason/code/scala/build/pack/lib/scala-library.jar:/Users/jason/code/scala/build/pack/lib/scala-parser-combinators_2.11-1.0.2.jar:/Users/jason/code/scala/build/pack/lib/scala-partest-extras.jar:/Users/jason/code/scala/build/pack/lib/scala-partest-javaagent.jar:/Users/jason/code/scala/build/pack/lib/scala-reflect.jar:/Users/jason/code/scala/build/pack/lib/scala-swing_2.11-1.0.1.jar:/Users/jason/code/scala/build/pack/lib/scala-xml_2.11-1.0.2.jar:/Users/jason/code/scala/build/pack/lib/scalap.jar -classpath '""' -Dscala.home=/Users/jason/code/scala/build/pack -Dscala.usejavacp=true -Denv.emacs= scala.tools.nsc.MainGenericRunner -version
The boot classpath contains `build/pack/lib/dir` but not `foo.txt`.
I will seek a Windows test of the same during PR review.
|
|\ \ \ \ \ \ \
| |_|_|_|/ / /
|/| | | | | |
| | | | | | |
| | | | | | | |
gourlaysama/wip/t8948-any-disappeared-from-scaladoc
SI-8948 resurrect the scaladoc for Any/AnyRef/Nothing/Null.
|
| | | | | | | |
|
|/ / / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
They disappeared in dc1cd96 when `scala.tools.nsc.doc.DocParser` lost
its `override def forScaladoc = true`, which used to trigger whether to
parse `DocDef` nodes. This was deprecated in favor of a custom global
when scaladoc was modularized out (#2226), but `DocParser` didn't get it
since it didn't override `forScaladoc` anymore...
I added back `forScaladoc` in `DocParser` for consistency with
`ScaladocGlobal`, although it doesn't do anything anymore.
|
|\ \ \ \ \ \
| |_|_|/ / /
|/| | | | | |
SI-8835 Fix implementation of Iterator drop to remove quadratic behavior
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
SI-5413 Test for fixed owner-corruption bug with names/defaults
|
| | |_|/ / /
| |/| | | |
| | | | | |
| | | | | | |
Fixed in SI-8111 / 2.10.4.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
SI-5665 Test case for fixed private[this], trait crasher
|
| |/ / / / /
| | | | | |
| | | | | |
| | | | | | |
Fixed in SI-5508 / cca4d51db.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Make t8960 pass under delambdafy:method
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
When using delambdafy:method, anonymous function classes are not
currently specialized, as noted here:
https://github.com/scala/scala/blob/f08e96571479552b103b15cc2d40ea5454999546/src/compiler/scala/tools/nsc/transform/Delambdafy.scala#L26
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-1994 Test case for fixed overriding problem
|
| | |_|_|/ / /
| |/| | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The test case passes since Scala 2.9.2.
Prior, it failed with:
~/scala/2.9.1/bin/scalac sandbox/t1994.scala
sandbox/t1994.scala:9: error: method y overrides nothing
override def y = 1
^
one error found
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-7750 Test case for fixed spurious existential feature warning
|
| |/ / / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
In 2.11.0-M8, the enclosed test issued the following feature
warning:
sandbox/t7750.scala:7: warning: the existential type LazyCombiner[_$1,_$2,_$3] forSome { type _$1; type _$2; type _$3 <: Growable[_$1] with Sizing }, which cannot be expressed by wildcards,
This went way in 2.11.0-RC1 after we turned off the problematic
attempt to infer existential bounds based on the bounds of the
corresponding type parameters.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-6856 Fix incorrect EBNF in comment in Parsers
|
| |/ / / / / /
| | | | | | |
| | | | | | |
| | | | | | | |
'&' isn't a prefix operator, perhaps to the chagrin of the C crowd.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-8966 Allow use of jvm-1.8 via the Ant scalac task
|