| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the same vein as SI-6994, we have to be careful not to warn
about synthetic code. In that case, the spurious warnings came
because we warned in the typechecker, which was also called in
erasure. In this case, we are issuing the warning in Uncurry,
so we must be mindful of the pattern matchers translations of
non-trivial catch patterns, which look like:
case (ex8 @ _) => {
<synthetic> val x5: Throwable = ex8;
case11(){
if ({
case14(){
if (x5.$isInstanceOf[NullPointerException]())
matchEnd13(true)
else
case15()
};
case15(){
if (x5.$isInstanceOf[RuntimeException]())
matchEnd13(true)
else
case16()
};
case16(){
matchEnd13(false)
};
matchEnd13(x: Boolean){
x
}
})
This commit detects that `ex8` is synthetic and disables the warning.
|
|\
| |
| | |
SI-6811 Remove scala.annotation.cloneable
|
| | |
|
|\ \
| | |
| | | |
SI-6747 Deprecate Range#{numRange,last,terminal}Element{s,}
|
| | |
| | |
| | |
| | | |
There are already better replacements which expose less surprising behaviour.
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
Conflicts:
src/partest/scala/tools/partest/DirectTest.scala
|
| |\ \ \
| | | | |
| | | | | |
Test for reading JDK 8 (classfile format 52) class files.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
We had several tests designed to only run if the JDK version was at
least some specified version. This commit refactors that common logic
into DirectTest.
|
| |\ \ \ \
| | | | | |
| | | | | | |
SI-6841 Fix bug at the intersection of DelayedInit and named args
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The DelayedInit transformation analyses the constructor to partition
regular initialization from calls to super constructors / trait
initializers.
It failed to find such super calls if they were nested in a Block,
which can happens when using named or default arguments.
This commit makes that code peer into Blocks to correctly partition
the constructor statements.
This change doesn't affect the result of run/t4680.scala, which was
mentioned in nearby comments and which chronicles bugs with DelayedInit
when used in inheritance hierarchies.
|
| |\ \ \ \ \
| | | | | | |
| | | | | | | |
SI-7558 Fix capture of free local vars in toolbox compiler
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
It was creating an `ObjectRef[<notype>]` because of a small
bug in `capturedVariableType`.
|
| |\ \ \ \ \ \
| | |/ / / / /
| |/| | | | | |
SI-7556 Fix runtime reflection involving ScalaLongSignature
|
| | |/ / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Scala type information is stored in classfiles in encoded in a String
in the ScalaSignature annotation. When it is too big for a single
String, it is split into an array of Strings in a different annotation,
ScalaLongSignature.
The enclosed test, with a class containing 3000 methods, uses the latter.
It exposes a bug in the way runtime reflection decodes that data.
It must concatentate and *then* decode, rather that the other way around.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
SI-7264 Initialize owner when searching for companion.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
From ClassSymbol:
protected final def companionModule0: Symbol =
flatOwnerInfo.decl(name.toTermName).suchThat(sym => sym.isModuleNotMethod && (sym isCoDefinedWith this))
protected final def flatOwnerInfo: Type = {
if (needsFlatClasses)
info
owner.rawInfo
}
Note the call to `rawInfo`; in the enclosed test case, that gives
us back an uninitialized type for the module class of `Foo`, and
consequently we don't find the companion for `Foo.Values`.
This commit forces the initialization of the owning symbol if it
was compiled in a prior run.
In addition, it adds a special case to `Run#compiles` for early
initialized symbols, which start out in life with the wrong owner.
As best as I can see, that complexity stems from allowing early
initialized members *without* return types to be used as value arguments
to the super call, which in turn is needed to infer parent type arguments.
The situation is described a little further in existing comments of
`typedPrimaryConstrBody`.
This bug is essentially another case of SI-6976. See the comments in pull
request of that patch (https://github.com/scala/scala/pull/1910) for
commit archaeology that shows why we're reluctant to force the owner
info more broadly than is done in this commit.
|
|\ \ \ \ \ \ \
| |_|_|_|_|/ /
|/| | | | | | |
Document exceptions thrown in some conversion methods of String
|
| | | | | | | |
|
| | |_|_|_|/
| |/| | | | |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
SI-7498 ParTrieMap.foreach no longer crashes
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Previously, the `split` method of the `ParTrieMap` iterator threw
an exception when splitting a splitter that iterated over nodes
whose hash codes collide.
This was due to reusing the iterator of the list of colliding keys
rather than creating a new splitter.
This commit changes the `subdivide` method to create a new
iterator using the factory method of the current trie map
iterator rather than returning a `LinearSeqLike` iterator.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Eliminate needless Options.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Many of our core types have dedicated sentinels which serve
perfectly to communicate "no value", even more perfectly than
None. Saving a billion allocations is gravy.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
SI-6503 Fix doctype, remove processing instructions, ...
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
I checked the generated HTML with the validators provided by
http://validator.w3.org/ and http://html5.validator.nu/ to verify that
all issues have been fixed.
Changes:
- Adapt doctype
- Remove processing instructions
- Add alt attributes to image tags
Before that, the output tried to be XHTML 1.1, but failed validation as
attested by both validators mentioned above, making it more likely to
trigger the quirks modes in browsers.
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
SI-7519 Less brutal attribute resetting in adapt fallback
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
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
|
|\ \ \ \ \ \ \ \ \ \
| |_|/ / / / / / / /
|/| | | | | | | | | |
SI-6308 Specialize methods that have some unspecialized params
|
| | |_|_|_|/ / / /
| |/| | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This is a continuation of 1591c14e50, which didn't go far enough
to handle method calls with a mix of specialized and unspecialized
type parameters.
This commit modifies `specSym` to calculate the residual type
of the original method after specialized type parameters have
been removed and the type environment of the candidate specialized
variant has been subsituted.
For example, here is trace of `specSym` when searcing for the
specialized variant of `f4` in the enclosed test:
tree = Main.this.f4[Nothing, Int]
tree.tpe = (a: Int, b: List[(Int, Nothing)])String
fun.tpe = [B, A](a: A, b: List[(A, B)])String
residualTreeType = [B](a: Int, b: List[(Int, B)])String
memberType = [B](a: Int, b: List[(Int, B)])String
env = Map(type A -> Int)
doesConform = true
A few "todo" tests are included that highlight an endemic
issue with the current specialization implementation: type
parameters that show up after `uncurry` might be clones of
the original symbols from typer, if they have been through
a TypeMap (e.g. within a call to `uncurryTreeType`). So testing
them for existence with the `typeEnv` map is fruitless.
No amount of `atPhase` acrobatics can rescue us from this;
we need to transport this information in a symbol-cloning
resiliant manner. Maybe Symbol Attachments?
|
|\ \ \ \ \ \ \ \ \
| |_|_|/ / / / / /
|/| | | | | | | | |
SI-2464 Resiliance against missing InnerClass attributes
|
| | |_|_|/ / / /
| |/| | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
A classfile in the wild related to Vaadin lacked the InnerClasses
attribute. As such, our class file parser treated a nested enum
class as top-level, which led to a crash when trying to find its
linked module.
More details of the investigation are available in the JIRA comments.
The test introduces a new facility to rewrite classfiles.
This commit turns this situation into a logged warning, rather
than crashing. Code by @paulp, test by yours truly.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
SI-7418 Avoid concurrent use of compiler in REPL startup
|
| | |/ / / / / /
| |/| | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Enable the tab completer *after* we're finished binding
$intp and unleashing power mode on the asynchronous
REPL startup thread.
Tested manually:
- run qbin/scala
- Paste "".toUp
- Hit <TAB> like a maniac
Before this patch, the crash was reproducible almost every time.
Afterwards, not the once.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Cleanup of crash output.
|
| | |/ / / / / /
| |/| | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
I finally ran across the assert (or one of them) which
produces such voluminous output that it scares the cattle.
When you see "decls" in an assert, run.
After silencing that, I extended the journey into quieting
the default crash message down, way down. I assume this
will be met only with sighs of relief. And then most
challenging of all for some reason, I convinced it to only
print the information once.
Volume of crash data generated when reproducing the fsc
bug shown below:
Before this commit 1158 lines
After this commit 27 lines
Pretty sure there's more information in the 27 lines.
To reproduce the crash:
fsc src/library/scala/collection/immutable/IntMap.scala
fsc src/library/scala/collection/immutable/IntMap.scala
The first compile succeeds quietly; the second throws warnings
out of the gate, then crashes. And the "after" output:
error: Cannot create static reference to method equals because object GenMapLike$class has no source module
error: fatal error:
while compiling: /scala/trunk/src/library/scala/collection/immutable/IntMap.scala
during phase: globalPhase=mixin, enteringPhase=cleanup
library version: version 2.11.0-20130606-052937-392858b4f6
compiler version: version 2.11.0-20130606-055515-1856bec71b
reconstructed args: -d /tmp
last tree to typer: Ident(key$2)
tree position: line 377 of /scala/trunk/src/library/scala/collection/immutable/IntMap.scala
tree tpe: Int
symbol: value key$2 (flags: <param> <synthetic>)
symbol definition: key$2: Int (a TermSymbol)
symbol package: scala.collection.immutable
symbol owners: value key$2 -> constructor IntMap$$anonfun$unionWith$2 -> anonymous class anonfun$unionWith$2
call site: object IntMap$Nil in package immutable in package immutable
== Source file context for tree position ==
374 }
375 case (IntMap.Tip(key, value), x) => x.updateWith[S](key, value, (x, y) => f(key, y, x))
376 case (x, IntMap.Tip(key, value)) => x.updateWith[S](key, value, (x, y) => f(key, x, y))
377 case (IntMap.Nil, x) => x
378 case (x, IntMap.Nil) => x
379 }
380
|
|\ \ \ \ \ \ \ \
| |/ / / / / / /
|/| | | | | | | |
Backport from paradise/macros
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Previous version of the MacroImplReference extractor didn't take into
the account the fact that RefTree.qualifier.symbol can be null (and it can
be null if RefTree is an Ident, because then qualifier is an EmptyTree).
This led to NPEs for really weird macro defs that refer to local methods
as their corresponding macro impls. Now I check for this corner case,
and the stuff now longer crashes.
This was wrong; this is how I fixed it; the world is now a better place.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Updates comments, implements accidentally forgotten IMPLPARAM_TREE,
creates a test to ensure that nothing else is overseen.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Cache the most recently created SubstTypeMap.
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
I discovered that a 1-element cache for SubstTypeMaps
gave a 75-90% hit rate.
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
SI-7149 Use a WeakHashSet for type uniqueness
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
perRunCaches was using a HashMap of WeakReferences which meant it would
accumulate WeakReferences over time. This commit uses a WeakHashSet
instead so that the references are cleaned up.
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Currently type uniqueness is done via a HashSet[Type], but
that means the Types live through an entire compile session, even
ones that are used once. The result is a huge amount of unnecessarily
retained memory. This commit uses a WeakHashSet instead so that Types
and their WeakReferences are cleaned up when no longer in use.
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Replaces scala.reflect.internal.WeakHashSet with a version that
* extends the mutable.Set trait
* doesn't leak WeakReferences
* is unit tested
|
|\ \ \ \ \ \ \ \ \ \
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
* pr/merge-2.10.2:
SI-7375 ClassTag for value class aliases
SI-7507 Fix lookup of private[this] member in presence of self type.
SI-7532 Fix regression in Java inner classfile reader
SI-7517 Fix higher kinded type inference regression
SI-7516 Revert "SI-7234 Make named args play nice w. depmet types"
A test case for a recent LUB progression.
SI-7421 remove unneeded extra-attachement in maven deploy
SI-7486 Regressions in implicit search.
SI-7509 Avoid crasher as erronous args flow through NamesDefaults
SI-6138 Centralize and refine detection of `getClass` calls
SI-7497 Fix scala.util.Properties.isMac
SI-7473 Bad for expr crashes postfix
Increase build.number to 2.10.3
SI-7391 Always use ForkJoin in Scala actors on ... ... Java 6 and above (except when the porperty actors.enableForkJoin says otherwise)
Reimplementing much of the DefaultPromise methods Optimizations: 1) Avoiding to call 'synchronized' in tryComplete and in tryAwait 2) Implementing blocking by using an optimized latch so no blocking ops for non-blockers 3) Reducing method size of isCompleted to be cheaper to inline 4) 'result' to use Try.get instead of patmat
c.typeCheck(silent = true) now suppresses ambiguous errors
Conflicts:
bincompat-backward.whitelist.conf
bincompat-forward.whitelist.conf
src/compiler/scala/reflect/macros/contexts/Typers.scala
src/compiler/scala/reflect/reify/package.scala
src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala
src/compiler/scala/tools/nsc/typechecker/Typers.scala
src/compiler/scala/tools/reflect/ToolBoxFactory.scala
src/library/scala/concurrent/impl/Promise.scala
src/reflect/scala/reflect/internal/Types.scala
|
| |\ \ \ \ \ \ \ \ \ \
| | |_|_|_|_|_|_|/ / /
| |/| | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | | |
* origin/2.10.2:
SI-7532 Fix regression in Java inner classfile reader
SI-7517 Fix higher kinded type inference regression
SI-7516 Revert "SI-7234 Make named args play nice w. depmet types"
SI-7486 Regressions in implicit search.
SI-7509 Avoid crasher as erronous args flow through NamesDefaults
|
| | |\ \ \ \ \ \ \ \ \
| | | | | | | | | | | |
| | | | | | | | | | | | |
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
```
|