| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
This was slated for removal in 2.12.
|
|
|
|
|
|
|
| |
Jason points out the recursion will be okay if
type checking the function inside the eta-expansion provides
fully determined argument types, as the result type is
not relevant for this phase of typedFunction.
|
|
|
|
|
|
| |
When recovering missing argument types for an
eta-expanded method value, rework the expected type
to a method type.
|
|\
| |
| | |
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.
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* commit '395e90a786':
SI-7251, compiler crash with $.
SI-7240 fixes language feature lookup
SI-7233 Account for aliased imports in Erasure
SI-7233 Account for aliased imports in eta expansion.
SI-7132 - don't discard Unit type in interpreter
SI-6725 `f` interpolator now supports %n tokens
Conflicts:
src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala
src/compiler/scala/tools/nsc/typechecker/EtaExpansion.scala
src/repl/scala/tools/nsc/interpreter/ExprTyper.scala
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Buggy:
treeCopy.Select(sel, sel.qual, sel.name) setSymbol null
Select(sel, sel.qual, sel.name)
Okay:
treeCopy.Select(sel, sel.qual, sel.name)
Select(sel, sel.qual, sel.symbol.name) // but doesn't copyAttrs!
It is an easy mistake to make, I've found one more occurance:
def foo(a: Any) = { import a.{toString => toS}; toS }
error: uncaught exception during compilation: scala.reflect.internal.FatalError
scala.reflect.internal.FatalError: class Object does not have a member toS
at scala.reflect.internal.Definitions$DefinitionsClass.scala$reflect$internal$Definitions$DefinitionsClass$$fatalMissingSymbol(Definitions.scala:1028)
A followup commit will address that problem.
|
| |
| |
| |
| |
| | |
unmoored doc comment" warning when building distribution for
scala itself.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
What would you prefer?
adaptToMemberWithArgs(tree, qual, name, mode, false, false)
Or:
adaptToMemberWithArgs(tree, qual, name, mode, reportAmbiguous = false, saveErrors = false)
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Translating <code></code> into backticks.
Removed the "@param tree ..." blocks which have been
taunting me for half a decade now.
Removed commented-out blocks of code which had been
sitting there for two years or more.
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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
|
| | |
|
|/
|
|
| |
And other polishing related to varargs handling.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When eta-expanding a function that takes a by-name param the local definition
for the corresponding argument is a function-0
val eta$1 = () => { argument-to-by-name }
If there are any definitinos in the `argument-to-by-name`, the symbol
owner needs to be changed to the anonymous function's symbol.
To know the function symbol in eta expand, we need to type-check the
function, and therefore pass the `Typer` instance to `etaExpand`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are the regexp replacements performed:
Sxcala
-> Scala
Copyright (\d*) LAMP/EPFL
-> Copyright $1-2012 LAMP/EPFL
Copyright (\d*)-(\d*)(,?) LAMP/EPFL
-> Copyright $1-2012 LAMP/EPFL
Copyright (\d*)-(\d*) Scala Solutions and LAMP/EPFL
-> Copyright $1-2012 Scala Solutions and LAMP/EPFL
\(C\) (\d*)-(\d*) LAMP/EPFL
-> (C) $1-2012 LAMP/EPFL
Copyright \(c\) (\d*)-(\d*)(.*?)EPFL
-> Copyright (c) $1-2012$3EPFL
The last one was needed for two HTML-ified copyright notices.
Here's the summarized diff:
Created using
```
git diff -w | grep ^- | sort | uniq | mate
git diff -w | grep ^+ | sort | uniq | mate
```
```
- <div id="footer">Scala programming documentation. Copyright (c) 2003-2011 <a href="http://www.epfl.ch" target="_top">EPFL</a>, with contributions from <a href="http://typesafe.com" target="_top">Typesafe</a>.</div>
- copyright.string=Copyright 2002-2011, LAMP/EPFL
- <meta name="Copyright" content="(C) 2002-2011 LAMP/EPFL"/>
- * Copyright 2002-2011 LAMP/EPFL
- * Copyright 2004-2011 LAMP/EPFL
- * Copyright 2005 LAMP/EPFL
- * Copyright 2005-2011 LAMP/EPFL
- * Copyright 2006-2011 LAMP/EPFL
- * Copyright 2007 LAMP/EPFL
- * Copyright 2007-2011 LAMP/EPFL
- * Copyright 2009-2011 Scala Solutions and LAMP/EPFL
- * Copyright 2009-2011 Scxala Solutions and LAMP/EPFL
- * Copyright 2010-2011 LAMP/EPFL
- * Copyright 2012 LAMP/EPFL
-# Copyright 2002-2011, LAMP/EPFL
-* Copyright 2005-2011 LAMP/EPFL
-/* NSC -- new Scala compiler -- Copyright 2007-2011 LAMP/EPFL */
-rem # Copyright 2002-2011, LAMP/EPFL
```
```
+ <div id="footer">Scala programming documentation. Copyright (c) 2003-2012 <a href="http://www.epfl.ch" target="_top">EPFL</a>, with contributions from <a href="http://typesafe.com" target="_top">Typesafe</a>.</div>
+ copyright.string=Copyright 2002-2012 LAMP/EPFL
+ <meta name="Copyright" content="(C) 2002-2012 LAMP/EPFL"/>
+ * Copyright 2002-2012 LAMP/EPFL
+ * Copyright 2004-2012 LAMP/EPFL
+ * Copyright 2005-2012 LAMP/EPFL
+ * Copyright 2006-2012 LAMP/EPFL
+ * Copyright 2007-2012 LAMP/EPFL
+ * Copyright 2009-2012 Scala Solutions and LAMP/EPFL
+ * Copyright 2010-2012 LAMP/EPFL
+ * Copyright 2011-2012 LAMP/EPFL
+# Copyright 2002-2012 LAMP/EPFL
+* Copyright 2005-2012 LAMP/EPFL
+/* NSC -- new Scala compiler -- Copyright 2007-2012 LAMP/EPFL */
+rem # Copyright 2002-2012 LAMP/EPFL
```
|
|\
| |
| | |
SI-4176 A repeat dose of repeated parameter type sanitization.
|
| |
| |
| |
| |
| |
| |
| | |
- During eta expansion, treat parameters of type A* as Seq[A]
- Do the same for method/class parameters as referred to by an Ident.
Also fixes SI-5967, which shows up during pattern matching.
|
|/
|
|
|
| |
Reworks part of e33901 / SI-5610, which was inserting an <empty> tree
as an argument in this case, which turns into a null in icode.
|
| |
|
|
|
|
|
|
| |
Taking adriaan's advice for what name would better describe this method.
Yours in reduction of ambiguous terminology, no review.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Proliferating the number of debugging modes because it's still way
too hard to see what's going on in there. Until we get hubert's type
debugger with its whiz-bang whizbanginess, we'll have to struggle along
with somewhat prettier ascii. This introduces:
-Yinfer-debug
which tries to print in readable fashion what is happening in the
worlds of inference and implicit search. It should be made a bit more
complementary and less overlappy with -Ytyper-debug. No review.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
questions start to arise as the ability to distinguish between type and
term names becomes more fully realized: particularly that the ability
to distinguish between TermSymbols and TypeSymbols has not come along
with the names. In any case, this is more tedious than I might have
anticipated but mostly because it's blazing a trail of typiness to ease
the path for others. No review.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TermName and TypeName are exposed throughout the compiler based on what
kind of name a given abstraction ought to have. (There remain places
where one needs to create a name without knowing yet what it will be,
and those will always be Names.)
The nme object in the compiler now holds only term names. To reference a
known type name, use tpnme:
nme.List == ("List": TermName)
tpnme.List == ("List": TypeName)
The contents of nme and tpname are defined in traits, many of which
are shared, so if a name should exist only as a Type and not a
Term, it should be defined in CompilerTypeNames, but otherwise in
CompilerTermNames or CompilerCommonNames. This is partially complete but
I'm sure there are still many shared which should pick a side.
Usage of .toTermName and .toTypeName is strongly discouraged. After the
dust has settled, there will be very few places where it will make sense
to hop between namespaces like that.
There are some implicits to smooth everything out, most of which should
be removable eventually.
// these two are in no hurry to go anywhere
String => TermName
String => TypeName
// but not String => Name: def view in the compiler is no longer implicit
// these two are temporary, and can log when they kick off to help us
flush // out remaining issues of "name migration" Name => TermName
Name => TypeName
There is more work to be done before we're properly protected from
naming errors, but I will not allow another eight hour tragedy to befall
lukas or anyone else!
Review by rytz. (Formality.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There was a fascinating tangle of name creation functions passing around
positions only to reach the end of the line and discard the position
since names don't have positions. I deleted all of it. The winner for
most creative use of parameters was the freshName function in etaExpand,
with this signature:
def freshName(pos: util.Position, n: Int)
And an implementation referencing neither pos nor n. "In a world beset
by attrition on all sides... a people defeated by entropy... one man
will show them the power of deletion." No review.
|
|
|
|
|
| |
Removed more than 3400 svn '$Id' keywords and related junk.
|
|
|
|
|
|
|
|
|
| |
As a brief diversion from real work, implemented Damerau–Levenshtein
and ran it on trunk to elicit obvious misspellings. Unfortunately
they're mostly in places like compiler comments which real people never
see, but I fixed them anyway. All those English Lit majors who peruse
our sources are sure to be pleased. No review.
|
|
|
|
|
|
| |
lifted out core compiler data structures into reflect.generic package.
Made Unpickler work on generic data.
|
|
|
|
|
|
|
|
|
| |
Made some cosmetic but clarity-increasing changes to a few files.
Primarily, used corresponds where possible rather than zipped.forall.
Added isImplicit and isJava to MethodType so the relevant subtypes
could be determined without the hideous isInstanceOf checks. Review by
odersky.
|
| |
|
|
|
|
|
|
| |
Deprecation patrol exercises the new capabilities in Tuple2.zipped among
other exciting no-ops.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
cleaned up eta-expansion of partial named applications
|
|
|
|
|
|
|
| |
- MethodTypes now have (params: List[Symbol])
- "copy"-methods for case classes
- the "copy" object in the compiler is now called "treeCopy"
|
| |
|
|
|
|
|
|
| |
Unreasonably satisfying patch which sets immutable final val inIDE = false
and then performs dead code elimination (human style.)
|
| |
|
| |
|
|
|
|
|
|
| |
(1) Removed generation of $tag method for interfaces (2) improved type
inference for clsoures (3) redesign of CharSequence and regex.
|
| |
|
|
|
|
|
|
| |
Changed ways inner types of modules print: Module.this.Type =>
Module.type
|
|
|
|
|
|
| |
Fixing a bug with long lists in GenerateIDESyms and a fresh name problem
in ETA expansion with respect to the IDE.
|
| |
|
| |
|