| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \
| | |
| | | |
SI-7261 Implicit conversion of BooleanSetting to Boolean and BooleanFlag
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit shortens expressions of the form `if (settings.debug.value)` to
`if (settings.debug)` for various settings. Rarely, the setting is supplied
as a method argument. The conversion is not employed in simple definitions
where the Boolean type would have to be specified.
|
|\ \ \
| | | |
| | | | |
[forward-port] SI-7232 Fix Java import vs defn. binding precendence
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Java Spec:
> A single-type-import declaration d in a compilation unit c
> of package p that imports a type named n shadows, throughout
> c, the declarations of:
> - any top level type named n declared in another compilation
> unit of p
> - any type named n imported by a type-import-on-demand
> declaration in c
> - any type named n imported by a static-import-on-demand
> declaration in c
Scala Spec:
> Bindings of different kinds have a precedence defined on them:
> 1. Definitions and declarations that are local, inherited, or made
> available by a package clause in the same compilation unit where
> the definition occurs have highest precedence.
> 2. Explicit imports have next highest precedence.
This is a forward port of 6e79370, which did not merge cleanly
and was omitted in the regular merge from 2.10.x to master.
Conflicts:
src/compiler/scala/tools/nsc/typechecker/Typers.scala
|
|\ \ \ \
| |_|/ /
|/| | | |
SI-7296 Lifting the limit on case class arity
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
When venturing above the pre-ordained limit of twenty
two, `Companion extends FunctionN` and `Companion.unapply`
are sacrificed. But oh-so-many other case class features
work perfectly: equality/hashing/stringification, the apply
method, and even pattern matching (which already bypasses
unapply.)
There was some understandable fear of the piecemeal when
I tabled this idea on scala-internals [1]. But I'd like
to persist as this limit is a needless source of pain for
anyone using case classes to bind to database, XML or JSON
schemata.
[1] https://groups.google.com/forum/#!topic/scala-internals/RRu5bppi16Y
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The implementation restriction doesn't stop subsequent
typechecking in the same compilation unit from triggering
type completion which tries to synthesize the unapply
method.
This commit predicates generation of the unapply method
on having 22 or fewer parameters.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Sifted through extraneous methods trying to find consistency,
consolidating and deprecating as I went. The original motivation
for all this was the restoration of LOCAL_SUFFIX to originalName,
because:
It looks like in an attempt to make originalName print
consistently with decodedName, I went a little too far and
stripped invisible trailing spaces from originalName. This
meant outer fields would have an originalName of '$outer'
instead of '$outer ', which in turn could have caused them to
be mis-recognized as outer accessors, because the logic of
outerSource hinges upon "originalName == nme.OUTER".
I don't know if this affected anything - I noticed it by
inspection, improbably enough.
Deprecated originalName - original, compared to what? - in
favor of unexpandedName, which has a more obvious complement.
Introduced string_== for the many spots where people have
given up and are comparing string representations of names.
A light dusting of types is still better than nothing.
Editoral note: LOCAL_SUFFIX is the worst. Significant trailing
whitespace! It's a time bomb.
|
| |
| |
| |
| |
| | |
unmoored doc comment" warning when building distribution for
scala itself.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Should speak for itself.
Whenever someone changed @switch from an error to a warning,
it broke all the tests which depended on the error. I added
-Xfatal-warnings to a couple which needed it. And one of those
tests was then failing, as it must now since we couldn't get away
with what was being attempted, so I moved it to pending.
|
| |
| |
| |
| |
| |
| |
| |
| | |
This is the commit which brings it all together. The booleans
forInteractive and forScaladoc are now deprecated and are not
inspected for any purpose. All behavioral changes formerly
accomplished via tests of those flags are embodied in the globals
built specifically for those tasks.
|
| |
| |
| |
| |
| |
| | |
This is a non-behaviorally-changing setup commit which
re-routes bits of code through avenues which can more easily
be influenced by subclasses of Global.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Seems like this was too optimistic:
> // later by lukas: disabled when fixing SI-5975
> // i think it cannot happen anymore
- restored the null check
- added logging when we set the namer in this attachment,
in the hope of spotting a pattern in the wild.
We don't have a test case yet; if we did we could most likely
have a more principled fix. But this should suffice for 2.10.1.
|
| |\
| | |
| | | |
Booking more progress on SI-6666
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This reverts commit 40063b0009d55ed527bf1625d99a168a8faa4124.
Conflicts:
src/compiler/scala/tools/nsc/ast/parser/Parsers.scala
src/compiler/scala/tools/nsc/typechecker/Typers.scala
|
| | | | |
| \ \ | |
| \ \ | |
| \ \ | |
|\ \ \ \ \
| | | |/ /
| | |/| /
| | | |/
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
merge-210
* commit 'b43ae58f31':
introduces an exhaustive java-to-scala test
SI-6989 privateWithin is now populated in reflect
* commit 'b579a42ee3':
SI-6888 Loosen criteria for $outer search.
* commit '81fa831609':
Class symbols can't be contravariant.
SI-6666 Catch VerifyErrors in the making in early defs.
Broader checks for poisonous this references.
Add a test case from the comments of SI-6666.
SI-6666 Account for nesting in setting INCONSTRUCTOR
Move a test from pos to run to highlight bytecode deficiencies.
Conflicts:
src/compiler/scala/tools/nsc/interpreter/IMain.scala
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This flag is calcualed in Namers, and assigned to class
and module class symbols that are defined in self/super-calls,
and in early definitions.
For example, class D is INCONSTRUCTOR in each case below:
class C extends Super({class D; ()})
class C(a: Any) {
def this(a: Any) = this({class D; ()})
}
new { val x = { class D; () } with Super(())
But, the calculation of this flag failed to account for
nesting, so it was not set in cases like:
class C(a: Any) {
def this(a: Any) = this({val x = {class D; ()}; x})
}
This patch searches the enclosing context chain, rather than
just the immediate context. The search is terminated at the
first non term-owned context. In the following example, this
avoids marking `E` as INCONSTRUCTOR; only `D` should be.
class C extends Super({class D { class E }; ()})
This closes SI-6259 and SI-6506, and fixes one problem
in the recently reopened SI-6957.
|
|\ \ \
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
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/continuations/plugin/scala/tools/selectivecps/CPSAnnotationChecker.scala
src/reflect/scala/reflect/internal/AnnotationCheckers.scala
src/reflect/scala/reflect/internal/Symbols.scala
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
AnnotationCheckers are insufficient because they live outside the
compiler cake and it's not possible to pass a Typer into an annotation
checker.
Analyzer plugins hook into important places of the compiler:
- when the namer assigns a type to a symbol (plus a special hook for
accessors)
- before typing a tree, to modify the expected type
- after typing a tree, to modify the type assigned to the tree
Analyzer plugins and annotation checker can be activated only during
selected phases of the compiler.
Refactored the CPS plugin to use an analyzer plugin (since
adaptToAnnotations is now part of analyzer plugins, no longer
annotation checkers).
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- when typing (and naming) a ValDef, tpt and rhs are now type checked
in the same context (the inner / ValDef context). this does not change
any behavior, but is more uniform (same as for DefDef). martin told me
(offline) that this change is desirable if it doesn't break anything.
(it doesn't).
- typeSig is now more uniform with a separate method for each case
(methodSig, valDefSig, etc). methodSig was cleaned up (no more variables)
and documented. the type returned by methodSig no longer contains /
refers to type skolems, but to the actual type parameters (so we don't
need to replace the skolems lateron).
- documentation on constructor contexts, type skolems
- more tests for SI-5543
|
| | |
|
| |
| |
| |
| |
| | |
I felt really uncomfortable having to stare at `parentTypes`, when
everyone else in Typers.scala is named typedSomething.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously I wanted to be as precise as possible, but as the experience
with type macros shows, a lot of isTermMacro checks should also extend
to include type macros.
Therefore I'm changing the checks to isMacro. This doesn't make any
difference for existing code, but will reduce the amount of changes
in the upcoming type macro pull request.
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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
|
| |
| |
| |
| |
| |
| | |
Instead of saying "only allowed on non-type members of traits" use
separate errors for "not allowed on types" and "only allowed on members
of traits"
|
| |
| |
| |
| |
| | |
"abstract override" shouldn't was being allowed on types in traits but the result
made no sense and the spec says that shouldn't be allowed.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Deprecated tpe_= on Tree, which is redundant with and
less useful than setType. To provide a small layer of
insulation from the direct nulling out of mutable fields
used to signal the typer, added def clearType() which is
merely tree.tpe = null but is shamefaced about the null
and var-settings parts like a respectable method should be.
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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
|
| |\
| | |
| | | |
SI-6558: typecheck lazy annotation info using non-silent context
|
| | |
| | |
| | |
| | | |
Make context for typing lazy annotations always non-silent. If lazy annotation info was created in local (silent) context, error could go unnoticed because later they would still use silent typer for typing the annotation.
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
At the moment parser does too much w.r.t handling of parent types.
It checks whether a parent can have value arguments or not and
more importantly, it synthesizes constructors and super calls.
This approach is fundamentally incompatible with upcoming type macros.
Take for example the following two snippets of code:
`class C extends A(2)`
`class D extends A(2) with B(3)`
In the first snippet, `A` might be a type macro, therefore the super call
`A.super(2)` eagerly emitted by the parser might be meaningless. In the
second snippet parser will report an error despite that `B` might be
a type macro which expands into a trait.
Unfortunately we cannot simply augment the parser with the `isTypeMacro`
check. This is because to find out whether an identifier refers to a type
macro, one needs to perform a typecheck, which the parser cannot do.
Therefore we need a deep change in how parent types and constructors
are processed by the compiler, which is implemented in this commit.
|
| |
| |
| |
| | |
Don't force the owner info.
|
| |
| |
| |
| | |
And simplify the name implicits.
|
|\ \
| | |
| | | |
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.
|
|\ \ \
| |/ /
|/| | |
Added -Xdev setting... you know, for devs
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|\ \ \
| |/ /
|/| | |
Fix for SI-6357, cycle with value classes.
|
| | |
| | |
| | |
| | | |
Don't force the owner info.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Scope lookup of an overloaded symbol was accidentally
forcing some lazy info. Since as usual the caller didn't
even have any interest in the symbol, but only in whether
the name existed at all, I changed it call the method I
made for this exact purpose, containsName. Also I much
reduced the number of checks being made in the quest for
an inherited copy method.
|
| |
| |
| |
| | |
Threw in deprecation warning reduction in src/compiler.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |\ |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It seems to me like every call to scope.lookup in the
compiler is a latent bug. If a symbol is overloaded, you
get one at random. (See the FIXME comment in f5c336d5660
for more on this.)
|