| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
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
|
|/
|
|
|
| |
Submitted to master under SI-4936, this fix allows :javap
to work when tools.jar is discovered by REPL.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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()
|
|\ \
| |/
|/| |
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.
|
|\ \
| | |
| | | |
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
|
| |/ |
|
|\ \
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Not every application will force these in a single thread; we
have to do our best to avoid cycles between them.
The enclosed test was failing every time before the change.
This commit breaks the cycle by avoiding computing `tupleNames`
in the constructor of `ScalaRuntime`. The new version has the
added benefit of including specialized tuple subclasses, which
is verified with a unit test for `isTuple`.
Are there more of these lurking? It seems likely. I'm more than
a little concerned about the way the `ControlThrowable` fires up
`scala.SystemProperties` to check whether or not to suppress
stack traces; there is already an ugly hack in place:
object NoStackTrace {
final def noSuppression = _noSuppression
// two-stage init to make checkinit happy,
// since sys.SystemProperties.noTraceSupression.value
// calls back into NoStackTrace.noSuppression
final private var _noSuppression = false
_noSuppression = sys.SystemProperties.noTraceSupression.value
}
|
|\ \
| | |
| | | |
typedAnnotated no longer emits nulls
|
| | |
| | |
| | |
| | |
| | |
| | | |
Adds a null-check in original synthesis for the result of typedAnnotated.
Previously it was possible for the aforementioned result to look like
TypeTree(<tpe>) setOriginal Annotated(..., null). Not anymore.
|
|\ \ \
| | | |
| | | | |
Backport #2605 to 2.10.x: SI-7149 Use a WeakHashSet for type uniqueness
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Replaces scala.reflect.internal.WeakHashSet with a version that
* extends the mutable.Set trait
* doesn't leak WeakReferences
* is unit tested
|
|\ \ \ \
| | | | |
| | | | | |
SI-7782 Derive type skolems at the ground level
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Rather than at the current value of `skolemizationLevel`,
which could be influenced by an in-flight existential
subtype computation.
This method is called in `PolyTypeCompleter`, which
could be constructed by the lazy type completer of the
enclosing class. So currently it is closing over a mutable
variable; hence the Heisenbug.
This issue was exposed by the changes in b74c33eb860,
which was introduced in Scala 2.10.1.
|
|\ \ \ \ \
| |_|/ / /
|/| | | | |
SI-4760 Parser handles block-ending import
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Don't molest the RBRACE.
Updated with additional parse tests suggested
by @retronym. "What are you lazy?" Yes, I
must be lazy. Can't ScalaCheck or Par-Test
generate these tests automatically? That seems
like a reasonable expectation.
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Rather than relying on the cloner to copy the
provided gitignore.SAMPLE files.
This finishes the job started in c48509598, mostly
by reverting that commit and moving the two existing
SAMPLE files to the final destinations.
Use `.git/info/exclude` to augment the list of patterns
with entries specific to your workflow.
(cherry picked from commit b51cb581270da7021b2ea122dc059847101d56a7)
==============================================
Paring back the scope of our shared .gitignore
Importantly, limit the exclusion of build.properties
to the file in the root directory, paving the way for
the return of an SBT build.
- Unignores .bak, .jar, and ~
- limit ignorance of qbin to the root directory
.log files, generated by partest, are still ignored.
To see ignored files in your workspace, try:
git ls-files --others --ignored --exclude-standard -- test | grep log
git status --ignored -- test
(cherry picked from commit f0bbd2ca32acb40be37dc382c1f95081deca3f22)
|
|\ \ \ \
| | | | |
| | | | | |
SI-7775 Harden against the shifting sands of System.getProperties
|
| | |_|/
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
If another thread writes a new system property (which can happen
in pretty innocuous code such as `new Date`!), the compiler startup
could fail with a `ConcurrentModificationException` as it iterated
all bindings in the properties map in search of a boot classpath
property for esoteric JVMs.
This commit uses `Properties#getStringProperties` to get a snapshot
of the keys that isn't backed by the live map, and iterates these
instead. That method will also limit us to bindings with String
values, which is all that we expect.
|
|\ \ \ \
| |_|_|/
|/| | | |
SI-7779 Account for class name compactification in reflection
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We have to assume that the classes we are reflecting on were
compiled with the default value for -Xmax-classfile-name (255).
With this assumption, we can apply the same name compactification
as done in the regular compiler.
The REPL is particularly prone to generating long class names
with the '$iw' prefixes, so this is an important fix for runtime
reflection.
Also adds support for getting the runtime class of `O.type` if
`O` is a module.
|
|\ \ \
| |_|/
|/| | |
Merge/2.10.2 to 2.10.x
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Moved an existing test from `pending` to `pos`. Not sure why
it was moved to `pending` in the first place.
Adds a new test distilled from building Scalaz with 2.10.3-RC1.
|
| |\ \
| | |/
| |/|
| | |
| | |
| | |
| | | |
Better late than never.
Conflicts:
src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala
|
| | |\
| | | |
| | | | |
SI-7532 Fix regression in Java inner classfile reader
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
395e90a modified the detection of top-level classes in
ClassfileParser in two ways:
1. used `Name#containsChar` rather than `toString.indexOf ...` (good!)
2. decoded the name before doing this check (bad!)
That code is actually only run for non-Scala classfiles, whose
names don't need decoding. Attempting to do so converted `R$attr`
to `R@tr`, which no longer contains a '$', and was wrongly treated
as a top level class.
This commit reverts the use of `decodedName`, and inlines the method
to its only call site for clarity.
|
| | |/
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- Discovered in 2.10.2-RC1
- Ostensibly regressed in 7e52fb910b, which conceptually reverted
part of 0cde930b so that (mutable) TypeVars don't use structural equality.
- But, does *not* fail if 7e52fb910b is cherry-picked directly after 0cde930b,
suggesting that it shone a light on a behaviour change in some other commit
in between the two.
- Indeed, the true regression came in https://github.com/scala/scala/commit/e5da30b843#L5L3176
- A targeted revert of e5da30b843 is undesirable, as we'd like SI-6846 to stay fixed
What's happening here? In the enclosed test case, higher kinded type
inference explores two possibilities:
Composed.this.Split[A]
K[[T]A[B[T]]] // `Split[A]` dealiased
The difference in the flow of type inference can be seen from the diff
below. Notice how now we no longer register `?K.addBound(Composed.this.Split)`,
we instead only register `?K.addBound(K)`
```patch
--- sandbox/old.log 2013-05-30 00:27:34.000000000 +0200
+++ sandbox/new.log 2013-05-30 00:28:28.000000000 +0200
@@ -1,55 +1,114 @@
?K.unifyFull(Composed.this.Split[A])
?K.unifySpecific(Composed.this.Split[A])
- ?K.addBound(Composed.this.Split)
?B.unifyFull(T)
?B.unifySpecific(T)
`-> false
?B.unifyFull(Any)
?B.unifySpecific(Any)
`-> false
`-> false
?K.unifySpecific(L[[T]A[B[T]]])
- ?K.addBound(L)
?B.unifyFull(B[T])
?B.unifySpecific(B[T])
?B.addBound(B)
`-> true
?B.unifyFull(B[T])
?B.unifySpecific(B[T])
?B.addBound(B)
`-> true
?B.unifyFull(B[T])
?B.unifySpecific(B[T])
?B.addBound(B)
`-> true
?B.unifyFull(B[T])
?B.unifySpecific(B[T])
?B.addBound(B)
`-> true
+ ?K.addBound(L)
`-> true
?K.unifyFull(Composed.this.Split[A])
?K.unifySpecific(Composed.this.Split[A])
- ?K.addBound(Composed.this.Split)
?B.unifyFull(x)
?B.unifySpecific(x)
`-> false
`-> false
?K.unifySpecific(L[[T]A[B[T]]])
+ ?B.unifyFull(B[T])
+ ?B.unifySpecific(B[T])
+ ?B.addBound(B)
+ `-> true
+ ?B.unifyFull(B[T])
+ ?B.unifySpecific(B[T])
+ ?B.addBound(B)
+ `-> true
+ ?B.unifyFull(B[T])
+ ?B.unifySpecific(B[T])
+ ?B.addBound(B)
+ `-> true
+ ?B.unifyFull(B[T])
+ ?B.unifySpecific(B[T])
+ ?B.addBound(B)
+ `-> true
?K.addBound(L)
+ `-> true
+?K.unifyFull(Composed.this.Split[A])
+ ?K.unifySpecific(Composed.this.Split[A])
+ ?B.unifyFull(T)
+ ?B.unifySpecific(T)
+ `-> false
+ ?B.unifyFull(Any)
+ ?B.unifySpecific(Any)
+ `-> false
+ `-> false
+ ?K.unifySpecific(L[[T]A[B[T]]])
?B.unifyFull(B[T])
?B.unifySpecific(B[T])
?B.addBound(B)
`-> true
?B.unifyFull(B[T])
?B.unifySpecific(B[T])
?B.addBound(B)
`-> true
?B.unifyFull(B[T])
?B.unifySpecific(B[T])
?B.addBound(B)
`-> true
?B.unifyFull(B[T])
?B.unifySpecific(B[T])
?B.addBound(B)
`-> true
+ ?K.addBound(L)
+ `-> true
+?K.unifyFull(Composed.this.Split[A])
+ ?K.unifySpecific(Composed.this.Split[A])
+ ?B.unifyFull(x)
+ ?B.unifySpecific(x)
+ `-> false
+ `-> false
+ ?K.unifySpecific(L[[T]A[B[T]]])
+ ?B.unifyFull(B[T])
+ ?B.unifySpecific(B[T])
+ ?B.addBound(B)
+ `-> true
+ ?B.unifyFull(B[T])
+ ?B.unifySpecific(B[T])
+ ?B.addBound(B)
+ `-> true
+ ?B.unifyFull(B[T])
+ ?B.unifySpecific(B[T])
+ ?B.addBound(B)
+ `-> true
+ ?B.unifyFull(B[T])
+ ?B.unifySpecific(B[T])
+ ?B.addBound(B)
+ `-> true
+ ?K.addBound(L)
+ `-> true
+?K.unifyFull(L[A])
+ ?K.unifySpecific(L[A])
+ ?K.addBound(L)
+ `-> true
+?K.unifyFull(L[A])
+ ?K.unifySpecific(L[A])
+ ?K.addBound(L)
`-> true
```
|
| | |\
| | | |
| | | | |
SI-7516 Revert "SI-7234 Make named args play nice w. depmet types"
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This reverts commit 83c9c764b528a7a1c1d39c480d22c8e3a71d5a58.
The tests are shunted to 'pending'.
Why revert this seemingly innocous commit? 83c9c764 generates a ValDef whose
tpt TypeTree has no original; this contains a reference to the symbol for `d`.
resetAttrs and the retypecheck assigns a new symbol for d and leaves a the
reference to the prior symbol dangling. The real bug is the resetAttrs concept.
|
| | |\ \
| | | |/
| | |/| |
SI-7486 Regressions in implicit search.
|
| | | |
| | | |
| | | |
| | | | |
Revert e86832d7e8 and dd33e280e2.
|
| | |/
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The fix for SI-7238 caused this regression.
This commit marks taints whole Apply with an ErrorType if it
has an erroneous argument, so as to stop a later crash trying
to further process the tree.
|
|/ /
| |
| |
| |
| |
| |
| | |
I'm looking at the changes made in 47f35b587, which
prevented cyclic errors in class file parsing. That fix
is insufficient for, or otherwise complicit in, SI-7778, for
which I've enclosed a pending test.
|