| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
SI-6546 InnerClasses attribute refers to absent class
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
At issue is that the optimizer would eliminate closure classes
completely, then neglect to eliminate those classes from the
container's InnerClasses attribute. This breaks tooling which
expects those entries to correspond to real classes.
The code change is essentially mgarcia's - I minimized it and
put the caches in perRunCaches, and added the test case which
verifies that after being compiled under -optimise, there are
no inner classes. Before/after:
7,8d6
< InnerClasses:
< public final #22; //class A_1$$anonfun$f$1
37,45c35,40
< #21 = Utf8 A_1$$anonfun$f$1
< #22 = Class #21 // A_1$$anonfun$f$1
< #23 = Utf8 Code
---
> #21 = Utf8 Code
|
|\ \
| |/
|/| |
SI-4012 Mixin and specialization work well
|
|/
|
|
| |
The bug was fixed along with SI-7638 in 504b5f3.
|
|\
| |
| | |
[nomaster] SI-7519 Less brutal attribute resetting in adapt fallback
|
| |
| |
| |
| | |
(cherry picked from commit e72c32db03b44d6eaf1c1872765a578c5445e15f)
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Prefers `resetLocalAttrs` over `resetAllAttrs`. The latter loses
track of which enclosing class of the given name is referenced by
a `This` node which prefixes the an applied implicit view.
The code that `resetAllAttrs` originally landed in: https://github.com/scala/scala/commit/d4c63b#L6R804
Cherry picked from 433880e91cba9e1e926e9fcbf04ecd4aeb1d73eb
Conflicts:
src/compiler/scala/tools/nsc/typechecker/Typers.scala
|
|\ \
| | |
| | | |
[nomaster] SI-6026 backport getResource bug fix
|
| | |
| | |
| | |
| | |
| | | |
Submitted to master under SI-4936, this fix allows :javap
to work when tools.jar is discovered by REPL.
|
|\ \ \
| |_|/
|/| | |
SI-6026 REPL checks for javap before tools.jar
|
| |/
| |
| |
| |
| |
| | |
If javap is already available, don't go hunting for tools.jar
This avoids the getResource bug in AbstractFileClassLoader.
|
|\ \
| |/
|/| |
Fix windows batch file with args containing parentheses
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In command scripts, substitution of `FOO` in `if cond ( %FOO% )` happens
*before* the condition is evaluated. One can use delayed expansion with
`if cond (!FOO!)` to get a saner behaviour. Or, as I ended up doing here,
use a goto in the body of the if rather than referring directly to variables
there.
Here's a cut down version to demonstrate the old problem:
C:\Users\IEUser>type test.cmd
@echo off
setlocal enableextensions enabledelayedexpansion
if [%~1]==[-toolcp] (
set CP=%~2
shift
shift
)
echo -toolcp %CP%
echo %~1 %~2
C:\Users\IEUser>test.cmd a b
-toolcp
a b
C:\Users\IEUser>test.cmd -toolcp "c:\program files" a b
-toolcp c:\program files
a b
C:\Users\IEUser>test.cmd -toolcp "c:\program files" "a()b" "c()d"
-toolcp c:\program files
a()b c()d
C:\Users\IEUser>test.cmd "a()b" "c()d"
d was unexpected at this time.
I don't understand exactly why the parentheses only mess things
up in this situation. But regardless, lets find another way.
My first attempt to fix this was based on the suggestion in the ticket.
But, as shown below, this fails to capture the -toolcp.
C:\Users\IEUser>type test.cmd
@echo off
setlocal enableextensions enabledelayedexpansion
if [%~1]==[-toolcp] (
set CP=!2!
shift
shift
)
echo -toolcp %CP%
echo %~1 %~2
C:\Users\IEUser>test.cmd "a()b" "c()d"
-toolcp
a()b c()d
C:\Users\IEUser>test.cmd -toolcp "c:\program files" "a()b" "c()d"
-toolcp
a()b c()d
Last stop was the goto you'll find in this patch.
With this patch applied, I tested on Windows 8 with the following:
C:\Users\IEUser>type Desktop\temp.cmd
::#!
@echo off
call scala %0 %*
goto :eof
::!#
println("hello, world")
println(argv.toList)
C:\Users\IEUser>scala Desktop\temp.cmd "foo(bar)baz"
"java" -Xmx256M -Xms32M -Dscala.home="C:\PROGRA~3\scala\bin\.."
-Denv.emacs="" -Dscala.usejavacp=true -cp "..."
scala.tools.nsc.MainGenericRunner Desktop\temp.cmd "foo(bar)baz"
hello, world
List(foo(bar)baz)
C:\Users\IEUser>scala -toolcp "c:\program files" Desktop\temp.cmd "foo(bar)baz"
"java" -Xmx256M -Xms32M -Dscala.home="C:\PROGRA~3\scala\bin\.."
-Denv.emacs="" -Dscala.usejavacp=true -cp "...;c:\program files"
scala.tools.nsc.MainGenericRunner -toolcp "c:\program files" Desktop\temp.cmd "foo(bar)baz"
hello, world
List(foo(bar)baz)
|
|\
| |
| | |
Disable flaky tests
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These are still impudently being non-deterministic.
I've reopened the ticket so we can take another swing at it.
A well targetted s/HashMap/LinkedHashMap/ will almost certainly
be the salve.
fail - neg/t7020.scala [output differs]% scalac t7020.scala
t7020.scala:3: warning: match may not be exhaustive.
It would fail on the following inputs: List((x: Int forSome x not in (1, 2, 4, 5, 6, 7))), List((x: Int forSome x not in (1, 2, 4, 5, 6, 7)), _), List(1, _), List(2, _), List(4, _), List(5, _), List(6, _), List(7, _), List(??, _), List(_, _)
List(5) match {
^
t7020.scala:10: warning: match may not be exhaustive.
It would fail on the following inputs: List((x: Int forSome x not in (1, 2, 4, 5, 6, 7))), List((x: Int forSome x not in (1, 2, 4, 5, 6, 7)), _), List(1, _), List(2, _), List(4, _), List(5, _), List(6, _), List(7, _), List(??, _), List(_, _)
List(5) match {
^
|
|/
|
|
|
|
|
|
| |
Francois is investigating the root cause as part of his
work on stabilizing Scaladoc preview in the IDE.
The test seems to only fail on the windows nightly build.
I suspect this is due to a slower or loaded machine.
|
|\
| |
| | |
Don't issue deprecation warnings for inferred TypeTrees
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Deprecation checks in RefChecks were looking into all TypeTrees
to find references to deprecated type aliases. However, when the
compiler infers a type argument or type of a member it creates
a TypeTree (with a null original) that was also leading to warnings.
I ran into this problem often when upgrading a build from SBT 0.12
to 0.13: a plugin I was using used the deprecated type alias, and I
suffered transitively when I used methods from its API.
This commit disables the checks for inferred TypeTree-s.
|
|\ \
| | |
| | | |
Bump version to 2.10.4 for nightlies
|
|/ / |
|
|\ \
| |/
|/| |
Merge/2.10.3 to 2.10.x
|
|/| |
|
| |\
| | |
| | | |
[nomaster] SI-7862: MANIFEST.MF file for Scala sources
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In order to be able to use published Scala jars as OSGi bundles in the
Eclipse build, Eclipse needs to match sources and binaries. That is
done by making source jars *source bundles*. This PR adds the required
manifest entries. Nothing else should be affected (file names remain
the same).
Cherry picked from 655b7d2601d7db9e98bb405da0a67c9068c98626
Conflicts:
build.xml
After this commit:
```
% ant -q dist.src
% for f in dists/scala-2.10.3-20130921-144112-892aa93cf7/src/*.jar; do \
echo $f \
unzip -p $f META-INF/MANIFEST.MF \
done
dists/scala-2.10.3-20130921-144112-892aa93cf7/src/fjbg-src.jar
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.4
Created-By: 1.6.0_37-b06-434-11M4509 (Apple Inc.)
dists/scala-2.10.3-20130921-144112-892aa93cf7/src/msil-src.jar
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.4
Created-By: 1.6.0_37-b06-434-11M4509 (Apple Inc.)
dists/scala-2.10.3-20130921-144112-892aa93cf7/src/scala-actors-src.jar
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.4
Created-By: 1.6.0_37-b06-434-11M4509 (Apple Inc.)
Bundle-Name: Scala Actors Sources
Bundle-SymbolicName: org.scala-lang.scala-actors.source
Bundle-Version: 2.10.3.v20130921-144112-892aa93cf7
Eclipse-SourceBundle: org.scala-lang.scala-actors;version="2.10.3.v201
30921-144112-892aa93cf7";roots:="."
dists/scala-2.10.3-20130921-144112-892aa93cf7/src/scala-compiler-src.jar
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.4
Created-By: 1.6.0_37-b06-434-11M4509 (Apple Inc.)
Bundle-Name: Scala Compiler Sources
Bundle-SymbolicName: org.scala-lang.scala-compiler.source
Bundle-Version: 2.10.3.v20130921-144112-892aa93cf7
Eclipse-SourceBundle: org.scala-lang.scala-compiler;version="2.10.3.v2
0130921-144112-892aa93cf7";roots:="."
dists/scala-2.10.3-20130921-144112-892aa93cf7/src/scala-library-src.jar
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.4
Created-By: 1.6.0_37-b06-434-11M4509 (Apple Inc.)
Bundle-Name: Scala Library Sources
Bundle-SymbolicName: org.scala-lang.scala-library.source
Bundle-Version: 2.10.3.v20130921-144112-892aa93cf7
Eclipse-SourceBundle: org.scala-lang.scala-library;version="2.10.3.v20
130921-144112-892aa93cf7";roots:="."
dists/scala-2.10.3-20130921-144112-892aa93cf7/src/scala-partest-src.jar
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.4
Created-By: 1.6.0_37-b06-434-11M4509 (Apple Inc.)
dists/scala-2.10.3-20130921-144112-892aa93cf7/src/scala-reflect-src.jar
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.4
Created-By: 1.6.0_37-b06-434-11M4509 (Apple Inc.)
Bundle-Name: Scala Reflect Sources
Bundle-SymbolicName: org.scala-lang.scala-reflect.source
Bundle-Version: 2.10.3.v20130921-144112-892aa93cf7
Eclipse-SourceBundle: org.scala-lang.scala-reflect;version="2.10.3.v20
130921-144112-892aa93cf7";roots:="."
dists/scala-2.10.3-20130921-144112-892aa93cf7/src/scala-swing-src.jar
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.4
Created-By: 1.6.0_37-b06-434-11M4509 (Apple Inc.)
Bundle-Name: Scala Swing Sources
Bundle-SymbolicName: org.scala-lang.scala-swing.source
Bundle-Version: 2.10.3.v20130921-144112-892aa93cf7
Eclipse-SourceBundle: org.scala-lang.scala-swing;version="2.10.3.v2013
0921-144112-892aa93cf7";roots:="."
dists/scala-2.10.3-20130921-144112-892aa93cf7/src/scalap-src.jar
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.4
Created-By: 1.6.0_37-b06-434-11M4509 (Apple Inc.)
```
|
| |\
| | |
| | | |
SI-7861 Don't execute internal callbacks on the user Executor
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Callbacks internal to the implementation of Futures should be
executed with the `InternalCallbackExecutor`, rather than the
user supplied `Executor`.
In a refactoring da54f34a6, `recoverWith` and `flatMap` no longer
played by these rules. This was noticed by a persnickety test in
Play.
Before this patch, the enclosed test outputs:
% scala-hash v2.10.3-RC2 test/files/run/future-flatmap-exec-count.scala
mapping
execute()
flatmapping
execute()
execute()
recovering
execute()
execute()
|
| |\
| | |
| | | |
Merge/2.10.x to 2.10.3
|
| | |\ |
|
| |/| | |
|
| |\ \ \
| | | | |
| | | | | |
Merge 2.10.2 into 2.10.3
|
| | |\ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Conflicts:
src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala
|
|\ \ \ \ \ \
| |_|_|_|_|/
|/| | | | | |
SI-7815 Dealias before deeming method type as dependent
|
| | |_|_|/
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
To enable eta-expansion of method types seen from a prefix that
renders the result type as independent from the parameter symbols.
The enclosed test shows that we dealias types before checking
dependence, and that we do this deeply (e.g. type arguments are
also dealised.)
An existing test, neg/error_dependentMethodTpeConversionToFunction,
confirms that bona-fide dependent methods are still prohibited from
eta expansion.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
update typesafe.artifactory-online.com to private-repo
|
| | | | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Change Scala license to unmodified 3-clause BSD.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
No longer using the slightly reworded 3-clause BSD license.
This does not change the meaning of the license,
just aligns it with the standard wording.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
SI-7825 Consider DEFAULTMETHOD when refchecking concreteness
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
There is no need to skip it as it only depends on our changes
to our JavaParser, and not on any bytecode features of Java 8.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
A class should not be required to implement a Java default method.
This commit uses `isDeferredNotDefault` in place of `isDeferred`
when finding unimplemented methods.
The test itself does not depend on Java 8 as we use scalac's
Java source parser to set things up.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
SI-7818 Cast our way out of extended existential angst
|
| | |_|_|/ / / /
| |/| | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
`substituteSymbols` is not sophisticated enough to
operate on `TypeSkolem`-s which are based on one of the
"from" symbols.
The pertinant usage of `substituteSymbols` for this bug in
in `Extender`. Recapping on that transform:
// orig
class C[T](...) extends AnyVal { def foo[U] = <rhs> }
// transform
class C[T] extends AnyVal { ... }
object C { def foo$extension[T', U'] = <rhs'> }
Where `<rhs'>` has been subtituted with, among other things,
`[T, U] ~> [T', U']`.
In this case our expected type contains a new type parameter
(of the extension method), whereas the type of the RHS contains
an existential skolem still pinned to the corresponding class type
parameter.
tree.tpe = Observable1#7037[_$1#12344]
<_$1#12344>.info = <: T#7040
pt = Observable1#7037[T#15644]
The limitation of substution is lamented in the comments
of `adaptMismatchedSkolems`, which faces the harder version of
the issue where the skolems are in the expected type.
But, we're in the "easy" case with the skolems in the tree's type;
we can cast our way out of the problem.
See also f335e447 / ed915c54.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
SI-7767 avoid rejecting Scaladoc comments in early initializers
|
| |\ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Test case for SI-7767
|
| |/ / / / / / / / |
|
| | |/ / / / / /
| |/| | | | | |
| | | | | | | |
| | | | | | | | |
review by @retronym
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
SI-7269 Rework MapLike#retains to account for desugaring change
|
| | |_|_|_|/ / /
| |/| | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
`MapLike#retains` contains a for-comprehension that relied on the strict
`filter` by its generator. You can't, in general, iterate a mutable map
and remove items in the same pass.
Here's the history of the desugaring of:
def retain[A, B](thiz: mutable.Map[A, B])(p: (A, B) => Boolean): thiz.type = {
thiz.foreach {
case (k, v) =>
if (p(k, v)) thiz -= k
}
Before regression (c82ecabad6~1):
thiz.filter(((check$ifrefutable$1) => check$ifrefutable$1: @scala.unchecked match {
case scala.Tuple2((k @ _), (v @ _)) => true
case _ => false
})).withFilter(((x$1) => x$1: @scala.unchecked match {
case scala.Tuple2((k @ _), (v @ _)) => p(k, v).unary_$bang
})).foreach(((x$2) => x$2: @scala.unchecked match {
case scala.Tuple2((k @ _), (v @ _)) => thiz.$minus$eq(k)
}));
After regression (c82ecabad6, which incorrectly assumed in the parser that
no filter is required for isInstanceOf[Tuple2])
thiz.withFilter(((x$1) => x$1: @scala.unchecked match {
case scala.Tuple2((k @ _), (v @ _)) => p(k, v).unary_$bang
})).foreach(((x$2) => x$2: @scala.unchecked match {
case scala.Tuple2((k @ _), (v @ _)) => thiz.$minus$eq(k)
}));
After the reversion of c82ecabad6, v2.10.2
This is also after 365bb2b4e, which uses `withFilter` rather than `filter`.
thiz.withFilter(((check$q$1) => check$ifrefutable$1: @scala.unchecked match {
case scala.Tuple2((k @ _), (v @ _)) => true
case _ => false
})).withFilter(((x$1) => x$1: @scala.unchecked match {
case scala.Tuple2((k @ _), (v @ _)) => p(k, v).unary_$bang
})).foreach(((x$2) => x$2: @scala.unchecked match {
case scala.Tuple2((k @ _), (v @ _)) => thiz.$minus$eq(k)
}));
This commit does the same as `SetLike#retains`, and converts the map to
an immutable list before the rest of the operation.
|
|\ \ \ \ \ \ \ \
| |_|/ / / / / /
|/| | | | | | | |
SI-7814 Avoid init cycle between Predef, `package`, ScalaRuntime
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Some tests for specialization use a modified version of
the standard library that count boxing, array lookups etc.
These sources are updated manually with the script:
% test/instrumented/mkinstrumented.sh build
Looks that that wasn't done for a while, though.
This commit brings it up to date, and adjusts a few braces in
ScalaRuntime.scala so the patch srt.scala (used by that script)
is shorter.
We should really avoid checking in the products of that script and
run it as part of the build, or, better, use the bytecode
instrumentation framework instead of a modified standard library.
But I have to leave that for another day.
|