| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |\
| | |
| | | |
Remove unrecognized doc comments
|
| | |
| | |
| | |
| | |
| | | |
unmoored doc comment" warning when building distribution for
scala itself.
|
| |\ \
| | |/
| |/| |
Warnings removal and other cleanup.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Mostly unused private code, unused imports, and points where
an extra pair of parentheses is necessary for scalac to have
confidence in our intentions.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Diligent reviewer observed that a hot spot was possibly
being made hotter. Reviewer's suggested remedy was a
spectacular bust, but studious observation revealed the news
lash that expensive methods are expensive and we should
avoid calling them if we can.
Put short-circuit test back in front of unapply call.
Now the time spent in unapply is within a few percent.
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
Another in the category of bugs which involve narrowing,
widening, mediuming, dealiasing, weakening, normalizing,
denormalizing, supernormalizing, subnormalizing, and
double-bounded supersubnormalizing.
This is probably not the ideal fix, but it is an improvement.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
What would you prefer?
adaptToMemberWithArgs(tree, qual, name, mode, false, false)
Or:
adaptToMemberWithArgs(tree, qual, name, mode, reportAmbiguous = false, saveErrors = false)
|
| |\
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/compiler/scala/tools/nsc/ast/Trees.scala
src/library/scala/concurrent/impl/ExecutionContextImpl.scala
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
Was: ``blah''
Now: `blah`
|
| |\ \
| | | |
| | | |
| | | |
| | | | |
Conflicts:
src/compiler/scala/tools/nsc/typechecker/Implicits.scala
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Calling normalize is very aggressive and is usually the wrong
thing. It is one of the leading contributors to non-determinism
in compiler outcomes (often of the form "I gave a debugging or
logging compiler option and it started/stopped working") and
should be used only in very specific circumstances.
Almost without exception, dealiasWiden is what you want; not
widen, not normalize. If possible I will remove normalize from
Type entirely, making it private to those areas of the compiler
which actually require it.
|
| |\ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Conflicts:
src/compiler/scala/tools/nsc/doc/Settings.scala
src/compiler/scala/tools/nsc/interpreter/CompletionOutput.scala
src/compiler/scala/tools/nsc/matching/Patterns.scala
src/compiler/scala/tools/nsc/transform/UnCurry.scala
src/compiler/scala/tools/nsc/typechecker/Infer.scala
src/compiler/scala/tools/nsc/typechecker/PatternMatching.scala
src/compiler/scala/tools/nsc/typechecker/Typers.scala
src/reflect/scala/reflect/internal/settings/MutableSettings.scala
src/reflect/scala/reflect/runtime/Settings.scala
src/swing/scala/swing/SwingActor.scala
src/swing/scala/swing/SwingWorker.scala
test/files/run/t6955.scala
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Reverts this line: 9c09c17#L50L671. That value was
apparantly discarded intentionally.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
I determined that many if not most of the calls to .normalize
have no intent beyond dealiasing the type. In light of this I
went call site to call site knocking on doors and asking why
exactly they were calling any of
.normalize
.widen.normalize
.normalize.widen
and if I didn't like their answers they found themselves
introduced to 'dropAliasesAndSingleTypes', the recursive widener
and dealiaser which I concluded is necessary after all.
Discovered that the object called 'deAlias' actually depends
upon calling 'normalize', not 'dealias'. Decided this was
sufficient cause to rename it to 'normalizeAliases'.
Created dealiasWiden and dealiasWidenChain.
Dropped dropAliasesAndSingleTypes in favor of methods
on Type alongside dealias and widen (Type#dealiasWiden).
These should reduce the number of "hey, the type alias doesn't work" bugs.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Another "attractive nuisance" burning off time until I
realized it was commented out.
|
| |\ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
* origin/2.10.x: (31 commits)
Implicit vars should have non-implicit setters.
Deprecate `scala.tools.nsc.Phases` because it's dead-code.
scaladoc Template: remove duplicate code and several usages of Option.get.
adds scala-reflect.jar to MIMA in ant
Test showing the absence of a forward reference
update mailmap
Remove dead code from `Global`.
Cleanup MemberLookup. Better explain ambiguous link targets.
typedIdent no longer destroys attachments
fixes incorrect handling of Annotated in lazy copier
simplifies checkBounds
Recurse into instantiations when stripping type vars.
Extract base scaladoc functionality for the IDE.
Expand pattern match position tests.
SI-6288 Remedy ill-positioned extractor binding.
SI-6288 Fix positioning of label jumps
SI-6288 Position argument of unapply
Fixes SI-6758: force LazyAnnnotationInfo for DefDef and TypeDef
SI-6795 Simplify errors related to "abstract override" on type members
SI-6795 Adds negative check for "abstract override" on types in traits
...
Conflicts:
.mailmap
src/compiler/scala/tools/nsc/Global.scala
src/compiler/scala/tools/nsc/ast/DocComments.scala
src/compiler/scala/tools/nsc/doc/base/CommentFactoryBase.scala
src/compiler/scala/tools/nsc/doc/html/page/Source.scala
src/compiler/scala/tools/nsc/doc/html/page/Template.scala
src/compiler/scala/tools/nsc/doc/model/LinkTo.scala
src/compiler/scala/tools/nsc/doc/model/MemberLookup.scala
src/compiler/scala/tools/nsc/doc/model/diagram/DiagramFactory.scala
src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
src/compiler/scala/tools/nsc/typechecker/Typers.scala
src/reflect/scala/reflect/runtime/JavaMirrors.scala
test/scaladoc/run/links.scala
|
| |\ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
* merge-wip-into-2.10.x: (44 commits)
Cleanups of reifyBoundTerm and reifyBoundType
SI-5841 reification of renamed imports
Share the empty LinkedList between first0/last0.
SI-4922 Show default in Scaladoc for generic methods.
SI-6614 Test case for fixed ArrayStack misconduct.
SI-6690 Release reference to last dequeued element.
SI-5789 Use the ReplTest framework in the test
SI-5789 Checks in the right version of the test
SI-5789 Removes assertion about implclass flag in Mixin.scala
SI-6766 Makes the -Pcontinuations:enable flag a project specific preference
more ListOfNil => Nil
DummyTree => CannotHaveAttrs
evicts assert(false) from the compiler
introduces global.pendingSuperCall
refactors handling of parent types
unifies approaches to call analysis in TreeInfo
TypeApply + Select and their type-level twins
SI-6696 removes "helper" tree factory methods
SI-6766 Create a continuations project in eclipse
Now the test suite runs MIMA for compatibility testing.
...
Conflicts:
src/compiler/scala/reflect/reify/codegen/GenUtils.scala
src/compiler/scala/tools/nsc/ast/Trees.scala
src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala
src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala
src/compiler/scala/tools/nsc/typechecker/Contexts.scala
src/compiler/scala/tools/nsc/typechecker/Namers.scala
src/compiler/scala/tools/nsc/typechecker/Typers.scala
src/eclipse/scala-compiler/.classpath
src/eclipse/scalap/.classpath
src/reflect/scala/reflect/internal/StdNames.scala
src/reflect/scala/reflect/internal/TreeInfo.scala
|
| |\ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
* merge-2.10-wip:
Fixing OSGi distribution.
Fix for rangepos crasher.
SI-6685 fixes error handling in typedApply
Test cases for SI-5726, SI-5733, SI-6320, SI-6551, SI-6722.
Asserts about Tree qualifiers.
Fix for SI-6731, dropped trees in selectDynamic.
neg test added
SI-5753 macros cannot be loaded when inherited from a class or a trait
Take advantage of the margin stripping interpolator.
Adds a margin stripping string interpolator.
SI-6718 fixes a volatile test
Mark pattern matcher synthetics as SYNTHETIC.
Set symbol flags at creation.
Fix for SI-6687, wrong isVar logic.
Fix for SI-6706, Symbol breakage under GC.
findEntry implementation code more concise and DRYer.
Fix for SI-6357, cycle with value classes.
Refactoring of adaptMethod
SI-6677 Insert required cast in `new qual.foo.T`
Conflicts:
src/compiler/scala/tools/nsc/transform/Erasure.scala
src/compiler/scala/tools/nsc/typechecker/Typers.scala
src/reflect/scala/reflect/internal/SymbolTable.scala
src/reflect/scala/reflect/internal/util/package.scala
test/files/neg/gadts1.check
|
| |\ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | | |
Removing unused code, take 2.
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Removing code from this neighborhood is more difficult than
elsewhere, making it all the more important that it be done.
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This reverts commit 951fc3a486.
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
I want to get this commit into the history because
the tests pass here, which demonstrates that every commented
out method is not only unnecessary internally but has zero
test coverage. Since I know (based on the occasional source
code comment, or more often based on knowing something about
other source bases) that some of these can't be removed
without breaking other things, I want to at least record
a snapshot of the identities of all these unused and
untested methods.
This commit will be reverted; then there will be another
commit which removes the subset of these methods which I
believe to be removable. The remainder are in great need of
tests which exercise the interfaces upon which other
repositories depend.
|
| |/ / / / / / /
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
A setting we developers can give all the time and expect to
hear useful things without being buried in debugging output.
As the comment says:
This is for WARNINGS which should reach the ears of scala
developers whenever they occur, but are not useful for normal
users. They should be precise, explanatory, and infrequent. Please
don't use this as a logging mechanism. !!! is prefixed to all
messages issued via this route to make them visually distinct.
This is what I always intended for "debugwarn", the method
I have deprecated in favor of the more accurate:
def devWarning(msg: => String): Unit
In this VERY SAME COMMIT, I performed the CLOSELY RELATED
task of quieting down an -Xlint warning which had become too
noisy thanks to implicit classes tickling it. I tightened that
warn condition to include both -Xlint and -Xdev.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
A dizzying number of unused imports, limited to files
in src/compiler. I especially like that the unused import
option (not quite ready for checkin itself) finds places
where feature implicits have been imported which are no
longer necessary, e.g. this commit includes half a dozen
removals of "import scala.language.implicitConversions".
|
| |\ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
* commit 'refs/pull/1574/head': (24 commits)
Fixing issue where OSGi bundles weren't getting used for distribution.
Fixes example in Type.asSeenFrom
Fix for SI-6600, regression with ScalaNumber.
SI-6562 Fix crash with class nested in @inline method
Brings copyrights in Scaladoc footer and manpage up-to-date, from 2011/12 to 2013
Brings all copyrights (in comments) up-to-date, from 2011/12 to 2013
SI-6606 Drops new icons in, replaces abstract types placeholder icons
SI-6132 Revisited, cleaned-up, links fixed, spelling errors fixed, rewordings
Labeling scala.reflect and scala.reflect.macros experimental in the API docs
Typo-fix in scala.concurrent.Future, thanks to @pavelpavlov
Remove implementation details from Position (they are still under reflection.internal). It probably needs more cleanup of the api wrt to ranges etc but let's leave it for later
SI-6399 Adds API docs for Any and AnyVal
Removing actors-migration from main repository so it can live on elsewhere.
Fix for SI-6597, implicit case class crasher.
SI-6578 Harden against synthetics being added more than once.
SI-6556 no assert for surprising ctor result type
Removing actors-migration from main repository so it can live on elsewhere.
Fixes SI-6500 by making erasure more regular.
Modification to SI-6534 patch.
Fixes SI-6559 - StringContext not using passed in escape function.
...
Conflicts:
src/actors-migration/scala/actors/migration/StashingActor.scala
src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala
src/compiler/scala/tools/nsc/settings/AestheticSettings.scala
src/compiler/scala/tools/nsc/transform/Erasure.scala
src/library/scala/Application.scala
src/library/scala/collection/immutable/GenIterable.scala.disabled
src/library/scala/collection/immutable/GenMap.scala.disabled
src/library/scala/collection/immutable/GenSeq.scala.disabled
src/library/scala/collection/immutable/GenSet.scala.disabled
src/library/scala/collection/immutable/GenTraversable.scala.disabled
src/library/scala/collection/mutable/GenIterable.scala.disabled
src/library/scala/collection/mutable/GenMap.scala.disabled
src/library/scala/collection/mutable/GenSeq.scala.disabled
src/library/scala/collection/mutable/GenSet.scala.disabled
src/library/scala/collection/mutable/GenTraversable.scala.disabled
src/library/scala/collection/parallel/immutable/ParNumericRange.scala.disabled
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
According to "git diff" the difference from master to this
commit includes:
Minus: 112 vals, 135 vars
Plus: 165 vals, 2 vars
Assuming all the removed ones were vals, which is true from 10K feet,
it suggests I removed 80 unused vals and turned 133 vars into vals.
There are a few other -Xlint driven improvements bundled with this,
like putting double-parentheses around Some((x, y)) so it doesn't
trigger the "adapting argument list" warning.
|
| |\ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
* merge-2.10.0-wip:
Use Typed rather than .setType
Wider use and a new variant of typedPos.
SI-6575 Plug inference leak of AbstractPartialFun
Remove compiler phases that don't influence scaladoc generation.
Disabled generation of _1, _2, etc. methods.
SI-6526 Additional test case.
Fix SI-6552, regression with self types.
avoid single-art assert where harmful in duration-tck
Fix for SI-6537, inaccurate unchecked warning.
Crash on missing accessor (internal bug in the lazy vals implementation) instead of trying to recover from the bug
Incorporated changes suggested in code review
Added one more test for SI-6358
Closes SI-6358. Move accessor generation for lazy vals to typers.
SI-6526 Tail call elimination should descend deeper.
Remove unneeded calls to substring()
Changes Tree and Type members from vals to defs.
Scaladoc knows the package structure of the libraries, so don't include them in external documentation setting.
Fixes SI-6170: issue with dragging scaladoc splitter over central iframe
Added a Swing ColorChooser wrapper
Added a Swing PopupMenu wrapper
Conflicts:
src/compiler/scala/reflect/reify/phases/Reshape.scala
src/compiler/scala/tools/nsc/typechecker/Duplicators.scala
src/continuations/plugin/scala/tools/selectivecps/SelectiveCPSTransform.scala
src/reflect/scala/reflect/internal/Types.scala
test/files/neg/unchecked-knowable.check
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
These are the call sites which formerly could be seen to
call .tpe on a symbol with unapplied type parameters. Now
each such call site makes an explicit choice about what is
intended for the result type.
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Apparently everyone agrees it's not used anymore.
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Oops, I miss when unreachable code was an error.
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Shame-driven development at its best.
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Since we don't throw exceptions for normal errors it was a bit odd
that we don't do that for DivergingImplicit.
As SI-7291 shows, the logic behind catching/throwing exception
was broken for divergence. Instead of patching it, I rewrote
the mechanism so that we now another SearchFailure type related
to diverging expansion, similar to ambiguous implicit scenario.
The logic to prevent diverging expansion from stopping the search
had to be slightly adapted but works as usual.
The upside is that we don't have to catch diverging implicit
for example in the presentation compiler which was again showing
that something was utterly broken with the exception approach.
NOTE: This is a partial backport of https://github.com/scala/scala/pull/2428,
with a fix for SI-7291, but without removal of error kinds (the former is
absolutely necessary, while the latter is nice to have, but not a must,
therefore I'm not risking porting it to 2.10.x). Also, the fix for SI-7291
is hidden behind a flag named -Xdivergence211 in order not to occasionally
break the code, which relies on pre-fix behavior.
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Imagine a macro writer which wants to synthesize a complex implicit
Complex[T] by making recursive calls to Complex[U] for its parts.
E.g. if we have `class Foo(val bar: Bar)` and `class Bar(val x: Int)`,
then it's quite reasonable for the macro writer to synthesize
Complex[Foo] by calling `inferImplicitValue(typeOf[Complex[Bar])`.
However if we didn't insert `info.sym.isMacro` check in `typedImplicit`,
then under some circumstances (e.g. as described in http://groups.google.com/group/scala-internals/browse_thread/thread/545462b377b0ac0a)
`dominates` might decide that `Bar` dominates `Foo` and therefore a
recursive implicit search should be prohibited.
Now when we yield control of divergent expansions to the macro writer,
what happens next? In the worst case, if the macro writer is careless,
we'll get a StackOverflowException from repeated macro calls. Otherwise,
the macro writer could check `c.openMacros` and `c.openImplicits` and
do `c.abort` when expansions are deemed to be divergent. Upon receiving
`c.abort` the typechecker will decide that the corresponding implicit
search has failed which will fail the entire stack of implicit searches,
producing a nice error message provided by the macro writer.
NOTE: the original commit from macro paradise also introduced a new
class, which encapsulates information about implicits in flight.
Unfortunately we cannot do that in 2.10.x, because of binary compatibility
concerns, therefore I'm marking this commit as [nomaster] and will be
resubmitting its full version in a separate pull request exclusively
targetting master.
|
| |_|_|_|_|_|_|_|/
|/| | | | | | | | |
|
|\ \ \ \ \ \ \ \ \
| |_|_|_|_|_|_|_|/
|/| | | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
We actually need to call normalize here, otherwise we don't
progress through #1 below.
[infer implicit] scala.this.Predef.implicitly[Higher[Foo.Bar]] with pt=Higher[Foo.Bar] in object Foo
1. tp=Foo.Bar tp.normalize=[A <: <?>]Foo.Bar[A] tp.dealias=Foo.Bar
2. tp=Foo.Bar[A] tp.normalize=Box[A] tp.dealias=Box[A]
|
|/ / / / / / / /
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Tag materialization notices enabled with -Xlog-implicits are now echoes
not printlns. Therefore, they go into stderr, not stdout, getting logged
by partest and not spamming stdout of partest.
|
| |_|_|_|_|_|/
|/| | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
In the interests of not breaking source compability.
A few projects are relying on this bug.
Should not be merged to master.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
An esoteric implicit search could trigger an "amb prefix ..."
message to standard out. Now the message has been improved
and sent to the logger.
|
| |_|_|_|_|/
|/| | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Squashed commit of the following:
commit 55806cc0e6177820c12a35a18b4f2a12dc07bb39
Author: Paul Phillips <paulp@improving.org>
Date: Wed Dec 19 07:32:19 2012 -0800
SI-6846, regression in type constructor inference.
In 658ba1b4e6 some inference was gained and some was lost.
In this commit we regain what was lost and gain even more.
Dealiasing and widening should be fully handled now, as
illustrated by the test case.
(cherry picked from commit dbebcd509e4013ce02655a2687b27d0967b3650e)
commit e6ef58447d0f4ef6de956fcc03ee283bb9028c02
Author: Paul Phillips <paulp@improving.org>
Date: Fri Dec 21 15:11:29 2012 -0800
Cleaning up type alias usage.
I determined that many if not most of the calls to .normalize
have no intent beyond dealiasing the type. In light of this I
went call site to call site knocking on doors and asking why
exactly they were calling any of
.normalize
.widen.normalize
.normalize.widen
and if I didn't like their answers they found themselves
introduced to 'dropAliasesAndSingleTypes', the recursive widener
and dealiaser which I concluded is necessary after all.
Discovered that the object called 'deAlias' actually depends
upon calling 'normalize', not 'dealias'. Decided this was
sufficient cause to rename it to 'normalizeAliases'.
Created dealiasWiden and dealiasWidenChain.
Dropped dropAliasesAndSingleTypes in favor of methods
on Type alongside dealias and widen (Type#dealiasWiden).
These should reduce the number of "hey, the type alias doesn't work" bugs.
(cherry picked from commit 3bf51189f979eb0dd41744ca844fd12dfdaa0dee)
Conflicts:
src/compiler/scala/tools/nsc/interpreter/CompletionOutput.scala
commit c1d8803cea1523f458730103386d8e14324a9446
Author: Paul Phillips <paulp@improving.org>
Date: Sat Dec 22 08:13:48 2012 -0800
Shored up a hidden dealiasing dependency.
Like the comment says:
// This way typedNew always returns a dealiased type. This
// used to happen by accident for instantiations without type
// arguments due to ad hoc code in typedTypeConstructor, and
// annotations depended on it (to the extent that they worked,
// which they did not when given a parameterized type alias
// which dealiased to an annotation.) typedTypeConstructor
// dealiases nothing now, but it makes sense for a "new" to
// always be given a dealiased type.
PS:
Simply running the test suite is becoming more difficult all
the time. Running "ant test" includes time consuming activities
of niche interest such as all the osgi tests, but test.suite
manages to miss the continuations tests.
(cherry picked from commit 422f461578ae0547181afe6d2c0c52ea1071d37b)
commit da4748502792b260161baa10939554564c488051
Author: Paul Phillips <paulp@improving.org>
Date: Fri Dec 21 12:39:02 2012 -0800
Fix and simplify typedTypeConstructor.
Investigating the useful output of devWarning (-Xdev people,
it's good for you) led back to this comment:
"normalize to get rid of type aliases"
You may know that this is not all the normalizing does.
Normalizing also turns TypeRefs with unapplied arguments
(type constructors) into PolyTypes. That means that when
typedParentType would call typedTypeConstructor it would
find its parent had morphed into a PolyType. Not that it
noticed; it would blithely continue and unwittingly discard
the type arguments by way of appliedType (which smoothly
logged the incident, thank you appliedType.)
The simplification of typedTypeConstructor:
There was a whole complicated special treatment of AnyRef
here which appears to have become unnecessary. Removed special
treatment and lit a candle for regularity.
Updated lots of tests regarding newly not-so-special AnyRef.
(cherry picked from commit 394cc426c1ff1da53146679b4e2995ece52a133e)
commit 1f3c77bacb2fbb3ba9e4ad0a8a733e0f9263b234
Author: Paul Phillips <paulp@improving.org>
Date: Fri Dec 21 15:06:10 2012 -0800
Removed dead implementation.
Another "attractive nuisance" burning off time until I
realized it was commented out.
(cherry picked from commit ed40f5cbdf35d09b02898e9c0950b9bd34c1f858)
|
|\ \ \ \ \ \
| |_|_|_|_|/
|/| | | | | |
SI-3995 Exclude companions with an existential prefix.
|
| | |_|_|/
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
In `(qual: Q).apply(expr)` where `expr` must be implictily
converted to a path dependent type `T` defined in `qual`,
we were looking for companion implicits via a path prefixed
by an existential skolem `_1`. These aren't much good to us,
as when we try to feed them into `mkAttributedQualifer`, a
crash rightly ensues.
This commit excludes companions prefixed by an existentially
bound path.
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
SI-6667 Abort after any ambiguous in-scope implicit
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Rather than continuing on to a search of implicits
of the expected type.
Previously, the companion implicits were searched if the
the caller was running the implicit search in silent
mode, for example if searching for an implicit parameter
in an application which has an expected type.
After this commit, the behaviour is consistent, regardless
on silent/non-silent typing.
|
| | |_|/
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Introduces AmbiguousSearchFailure to go with the
the existing SearchFailure, and changes predicates
to use `SearchResult.{isFailure, isSuccess}`.
This doesn't change behaviour; it is a preparatory
commit for SI-6667.
|
|/ / /
| | |
| | |
| | | |
Safer and shorter.
|
| |/
|/| |
|
|/
|
|
|
|
| |
It's safe to replace `localTyper.typed(atPos(pos)(tree))` with
`localTyper.typedPos(pos)(tree)` given that we're all in the
same cake and we'll get to the same `atPos`.
|
|
|
|
|
| |
As the experience has shown, there's no need for a separate layer of reflection
in scala-library.jar. Therefore I'm putting an end to it.
|