summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit '36967321c7' into merge-2.11.x-to-2.12.x-20170214Seth Tisue2017-02-161-2/+3
|\
| * SI-9331 Fix canEqual for case classes with HK type paramsJason Zaugg2017-01-091-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Time for the courage of our convictions: follow the advice of my TODO comment from SI-8244 / f62e280825 and fix `classExistentialType` once and for all. This is the change in the generated `canEquals` method in the test case; we no longer get a kind conformance error. ``` --- sandbox/old.log 2015-05-27 14:31:27.000000000 +1000 +++ sandbox/new.log 2015-05-27 14:31:29.000000000 +1000 @@ -15,7 +15,7 @@ case _ => throw new IndexOutOfBoundsException(x$1.toString()) }; override <synthetic> def productIterator: Iterator[Any] = runtime.this.ScalaRunTime.typedProductIterator[Any](Stuff.this); - <synthetic> def canEqual(x$1: Any): Boolean = x$1.$isInstanceOf[Stuff[Proxy[PP]]](); + <synthetic> def canEqual(x$1: Any): Boolean = x$1.$isInstanceOf[Stuff[_ <: [PP]Proxy[PP]]](); override <synthetic> def hashCode(): Int = ScalaRunTime.this._hashCode(Stuff.this); override <synthetic> def toString(): String = ScalaRunTime.this._toString(Stuff.this); override <synthetic> def equals(x$1: Any): Boolean = x$1 match { @@ -38,9 +38,3 @@ } } ``` I also heeded my own advice to pass in a prefix to this method.
| * [backport] SI-9375 add synthetic readResolve only for static modulesLukas Rytz2015-09-221-0/+1
| | | | | | | | | | | | | | | | | | For inner modules, the synthetic readResolve method would cause the module constructor to be invoked on de-serialization in certain situations. See the discussion in the ticket. Adds a comprehensive test around serializing and de-serializing modules.
* | Remove the duplicate implem of hash codes for numbers.Sébastien Doeraene2016-04-211-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, there were two separate implementations of hash code for boxed number classes: * One in Statics, used by the codegen of case class methods. * One in ScalaRunTime + BoxesRunTime, used by everything else. This commit removes the variant implemented in ScalaRunTime + BoxesRunTime, and always uses Statics instead. We use Statics because the one from ScalaRunTime causes an unnecessary module load. The entry point ScalaRunTime.hash() is kept, as deprecated, for bootstrapping reasons.
* | Remove unused imports and other minor cleanupsSimon Ochsenreither2015-12-181-3/+5
| | | | | | | | | | | | | | | | | | | | - Language imports are preceding other imports - Deleted empty file: InlineErasure - Removed some unused private[parallel] methods in scala/collection/parallel/package.scala This removes hundreds of warnings when compiling with "-Xlint -Ywarn-dead-code -Ywarn-unused -Ywarn-unused-import".
* | SI-9375 add synthetic readResolve only for static modulesLukas Rytz2015-07-301-0/+1
| | | | | | | | | | | | | | | | | | For inner modules, the synthetic readResolve method would cause the module constructor to be invoked on de-serialization in certain situations. See the discussion in the ticket. Adds a comprehensive test around serializing and de-serializing modules.
* | Cleanup in RefchecksLukas Rytz2015-07-241-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | For historical reasons, when eliminating ModuleDef trees, RefChecks would check if moduleVar field already exists, and only create it if not. In reality, the lookup would always fail. When initially committed, the moduleVar could be created either by the RefChecks transformer or info transformer, see 256aca6. This was later changed (3f1f0a4), after which RefChecks only creates a moduleVar when eliminating a ModuleDef.
* | Merge commit '32f520f' into merge/2.11-to-2.12-apr-1Lukas Rytz2015-04-011-1/+1
|\|
| * Removed warningsEECOLOR2015-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added `since` to deprecation statement - Added unit to parameter list - Removed usage of deprecated method polyType - Replaced deprecated `debugwarn` with `devWarning` - Changed switch statement to if else in order to remove a warning - Switched implementation of `init` and `processOptions` to prevent warning - Replaced deprecated `Console.readLine` with `scala.io.StdIn.readLine` - Replaced deprecated `startOrPoint` with `start` - Replaced deprecated `tpe_=` with `setType` - Replaced deprecated `typeCheck` with `typecheck` - Replaced deprecated `CompilationUnit.warning` with `typer.context.warning` - Replaced deprecated `scala.tools.nsc.util.ScalaClassLoader` with `scala.reflect.internal.util.ScalaClassLoader` - Replaced deprecated `scala.tools.ListOfNil` with `scala.reflect.internal.util.ListOfNil` - Replaced deprecated `scala.tools.utils.ScalaClassLoader` with `scala.reflect.internal.util.ScalaClassLoader` - Replaced deprecated `emptyValDef` with `noSelfType` - In `BoxesRunTime` removed unused method and commented out unused values. Did not delete to keep a reference to the values. If they are deleted people might wonder why `1` and `2` are not used. - Replaced deprecated `scala.tools.nsc.util.AbstractFileClassLoader` with `scala.reflect.internal.util.AbstractFileClassLoader`
* | Merge remote-tracking branch 'origin/2.11.x' into ↵Jason Zaugg2015-01-291-1/+1
|\| | | | | | | | | | | | | | | | | merge/2.11.x-to-2.12.x-20150129 Conflicts: build.number src/library/scala/concurrent/Future.scala versions.properties
| * Fix many typos in docs and commentsmpociecha2014-12-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This commit corrects many typos found in scaladocs, comments and documentation. It should reduce a bit number of PRs which fix one typo. There are no changes in the 'real' code except one corrected name of a JUnit test method and some error messages in exceptions. In the case of typos in other method or field names etc., I just skipped them. Obviously this commit doesn't fix all existing typos. I just generated in IntelliJ the list of potential typos and looked through it quickly.
* | Merge commit '7ba38a0' into merge/2.11.x-to-2.12.x-20150129Jason Zaugg2015-01-291-0/+3
|\| | | | | | | | | | | | | | | Conflicts: build.number src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala src/library/scala/collection/Iterator.scala versions.properties
| * SI-8943 Handle non-public case fields in pres. compilerJason Zaugg2014-10-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a case class is type checked, synthetic methods are added, such as the `hashCode`/`equals`, implementations of the `Product` interface. At the same time, a case accessor method is added for each non-public constructor parameter. This the accessor for a parameter named `x` is named `x$n`, where `n` is a fresh suffix. This is all done to retain universal pattern-matchability of case classes, irrespective of access. What is the point of allowing non-public parameters if pattern matching can subvert access? I believe it is to enables private setters: ``` case class C(private var x: String) scala> val x = new C("") x: C = C() scala> val c = new C("") c: C = C() scala> val C(x) = c x: String = "" scala> c.x <console>:11: error: variable x in class C cannot be accessed in C c.x ^ scala> c.x = "" <console>:13: error: variable x in class C cannot be accessed in C val $ires2 = c.x ^ <console>:10: error: variable x in class C cannot be accessed in C c.x = "" ^ ``` Perhaps I'm missing additional motivations. If you think scheme sounds like a binary compatiblity nightmare, you're right: https://issues.scala-lang.org/browse/SI-8944 `caseFieldAccessors` uses the naming convention to find the right accessor; this in turn is used in pattern match translation. The accessors are also needed in the synthetic `unapply` method in the companion object. Here, we must tread lightly to avoid triggering a typechecking cycles before; the synthesis of that method is not allowed to force the info of the case class. Instead, it uses a back channel, `renamedCaseAccessors` to see which parameters have corresonding accessors. This is pretty flaky: if the companion object is typechecked before the case class, it uses the private param accessor directly, which it happends to have access to, and which duly gets an expanded name to allow JVM level access. If the companion appears afterwards, it uses the case accessor method. In the presentation compiler, it is possible to typecheck a source file more than once, in which case we can redefine a case class. This uses the same `Symbol` with a new type completer. Synthetics must be re-added to its type. The reported bug occurs when, during the second typecheck, an entry in `renamedCaseAccessors` directs the unapply method to use `x$1` before it has been added to the type of the case class symbol. This commit clears corresponding entries from that map when we detect that we are redefining a class symbol. Case accessors are in need of a larger scale refactoring. But I'm leaving that for SI-8944.
| * [nomaster] SI-8764 fix return type of case class productElement under ↵Antoine Gourlay2014-09-091-1/+1
| | | | | | | | | | | | | | | | | | | | Xexperimental Under Xexperimental, productElement now returns the lub instead of the weak lub of case class parameter types (numeric widening shouldn't magically happen *inside* productElement). This was removed from 2.12.x in 6317ae2.
* | SI-8944 A more resiliant naming scheme for case accessorsJason Zaugg2014-11-121-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Case class parameters that are less that public have an extra accessor method created to ensure universal pattern matchability. See #4081 for more background. Currently, this is given a fresh name based on the parameter name. However, this is fragile and the name can change based on unrelated edits higher up in the source file. This commit switches to a stable naming scheme for these methods. A non-public case field `foo` has a corresponding accessor `foo$access$N`, where `N` is the index of the parameter within the constructor parameter list. The enclosed tests show a case that used to trigger a linkage error under separate compilation that now works; shows that by choosing the `foo$access$1` rather than `foo$1` we don't clash with lambda lifted methods in the class; and shows the names of the accessor methods as seen via Java reflection.
* | Merge pull request #3970 from gourlaysama/wip/t8764-product-case-classGrzegorz Kossakowski2014-09-091-21/+3
|\ \ | |/ |/| SI-8764 remove Xexperimental special Product members for case classes
| * SI-8764 remove Xexperimental special Product members for case classesAntoine Gourlay2014-09-081-21/+3
| | | | | | | | | | | | | | | | | | | | | | `productElement` and `productIterator` return types under Xexperimental use the weak lub of the case class's parameters instead of just Any. This isn't really useful, nor tested and it is broken (SI-8764) anyway. The special casing of `productElement` and `productIterator` was introduced with `ProductN` support in case classes (e412524), but was not removed when `ProductN` support went away (70996f8, d7f498a, b7395e9, 317a105).
* | SI-8525 No anonymous lintSom Snytt2014-07-101-6/+5
|/ | | | | | | | | Turn anonymous references to `settings.lint` into named settings. After that, trust to Adriaan to make them filterable. There are a few remaining top-level -Y lint warnings that are deprecated.
* SI-8132 Fix false "overrides nothing" for case class protected paramJason Zaugg2014-01-151-1/+1
| | | | | | | | | | | | | | | Case class parameters that are less-than-public have an accessor method created. In the enclosed test, we saw: case class G extends AnyRef with T with Product with Serializable { override <synthetic> <stable> <caseaccessor> def s$1: String = G.this.s; <caseaccessor> <paramaccessor> private[this] val s: String = _; override <stable> <accessor> <paramaccessor> protected def s: String = G.this.s; ... } This commit removes the OVERRIDE flag from the accessor method, which avoids the spurious "overrides nothing" error.
* Removing unused code.Paul Phillips2013-10-021-1/+1
| | | | | | | Most of this was revealed via -Xlint with a flag which assumes closed world. I can't see how to check the assumes-closed-world code in without it being an ordeal. I'll leave it in a branch in case anyone wants to finish the long slog to the merge.
* Make all numeric coercions explicit.Paul Phillips2013-05-271-7/+8
| | | | | | | | | | | | | Optimistically, this is preparation for a day when we don't let numeric types drift with the winds. Even without the optimism it's a good idea. It flushed out an undocumented change in the math package object relative to the methods being forwarded (a type is widened from what is returned in java) so I documented the intentionality of it. Managing type coercions manually is a bit tedious, no doubt, but it's not tedious enough to warrant abandoning type safety just because java did it.
* Concision contribution.Paul Phillips2013-05-231-9/+9
| | | | | | | | | | | | | | | | | | | | | We have lots of core classes for which we need not go through the symbol to get the type: ObjectClass.tpe -> ObjectTpe AnyClass.tpe -> AnyTpe I updated everything to use the concise/direct version, and eliminated a bunch of noise where places were calling typeConstructor, erasedTypeRef, and other different-seeming methods only to always wind up with the same type they would have received from sym.tpe. There's only one Object type, before or after erasure, with or without type arguments. Calls to typeConstructor were especially damaging because (see previous commit) it had a tendency to cache a different type than the type one would find via other means. The two types would compare =:=, but possibly not == and definitely not eq. (I still don't understand what == is expected to do with types.)
* Merge pull request #2436 from paulp/pr/lub-productionPaul Phillips2013-04-251-1/+1
|\ | | | | Minor overhaul of lub-producing typer methods.
| * Minor overhaul of lub-producing typer methods.Paul Phillips2013-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were a number of inefficiencies and unnecessary indirections in these methods. I beat them into better shape. Some highlights: - eliminated ptOrLub and similar. We must do something to suppress peoples' urge to tack a Boolean onto another method: these methods returned (Type, Boolean) and in addition to being horribly inefficient, it's vastly harder to follow the logic. Anything which can be written with a Boolean parameter or multi-value return can probably be written without the Boolean parameter and/or the multi-value return. - eliminated all the vars in the lub producing methods. Again, it's just a lot easier to understand code when I don't have to keep scanning up and down to see where and how previously declared names are being changed midstream. - added "sameWeakLubAsLub", which is the bit of information which was being tacked onto ptOrLub. This lets them all find out in advance whether the lub result implies further tree adaptation is necessary.
* | Eliminated the accumulated feature warnings.Paul Phillips2013-04-231-0/+1
| | | | | | | | | | | | | | | | | | No, this isn't busywork, how dare you suggest such a thing. I intend my tombstone to say HERE LIES EXTEMPORE, WHO ELIMINATED A LOT OF SIP-18 WARNINGS REST IN PEACE
* | Eliminate a pile of -Xlint warnings.Paul Phillips2013-04-231-5/+7
|/ | | | | | Some unused private code, unused imports, and points where an extra pair of parentheses is necessary for scalac to have confidence in our intentions.
* SI-7261 Implicit conversion of BooleanSetting to Boolean and BooleanFlagSom Snytt2013-03-271-2/+2
| | | | | | | 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.
* Doc -> C-style comments for local symbols to avoid "discardingEugene Vigdorchik2013-03-211-49/+48
| | | | | unmoored doc comment" warning when building distribution for scala itself.
* Merge remote-tracking branch 'origin/2.10.x' into merge-210Paul Phillips2013-02-101-0/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/2.10.x: Fix for paramaccessor alias regression. Expanded bytecode testing code. SI-5675 Discard duplicate feature warnings at a position accommodates pull request feedback term and type reftrees are now reified uniformly SI-6591 Reify and path-dependent types SI-7096 SubstSymMap copies trees before modifying their symbols SI-6961 no structural sharing in list serialization SI-6187 Make partial functions re-typable [backport] SI-6478 Fixing JavaTokenParser ident SI-7100 Fixed infinite recursion in duplicators SI-6146 More accurate prefixes for sealed subtypes. SI-5082 Cycle avoidance between case companions SI-6113 typeOf now works for type lambdas SI-5824 Fix crashes in reify with _* SI-7026: parseTree should never return a typed one SI-7070 Turn restriction on companions in pkg objs into warning Conflicts: src/compiler/scala/reflect/reify/codegen/GenSymbols.scala src/compiler/scala/tools/nsc/typechecker/PatternMatching.scala src/compiler/scala/tools/nsc/typechecker/Typers.scala src/compiler/scala/tools/reflect/ToolBoxFactory.scala src/library/scala/collection/immutable/List.scala src/reflect/scala/reflect/internal/TreeInfo.scala src/reflect/scala/reflect/internal/Types.scala src/reflect/scala/reflect/internal/settings/MutableSettings.scala src/reflect/scala/reflect/runtime/Settings.scala test/files/buildmanager/t2650_1/t2650_1.check test/files/buildmanager/t2657/t2657.check test/files/neg/t3234.check test/files/run/idempotency-this.check test/files/run/macro-typecheck-macrosdisabled2.check test/files/run/showraw_tree.check test/files/run/showraw_tree_ids.check test/files/run/showraw_tree_kinds.check test/files/run/showraw_tree_types_ids.check test/files/run/showraw_tree_types_typed.check test/files/run/showraw_tree_types_untyped.check test/files/run/showraw_tree_ultimate.check test/files/run/t2886.check test/files/run/t5225_2.check test/files/run/t5374.check test/files/run/t5374.scala test/files/run/t6329_repl.check test/files/run/toolbox_typecheck_macrosdisabled2.check
| * SI-5082 Cycle avoidance between case companionsJason Zaugg2013-02-071-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can synthesize the case companion unapply without forcing the info of the case class, by looking at the parameters in the `ClassDef` tree, rather than at `sym.caseFieldAccessors`. Access to non-public case class fields routed through the already-renamed case accessor methods. The renamings are conveyed via a back-channel (a per-run map, `renamedCaseAccessors`), rather than via the types to give us enough slack to avoid the cycle. Some special treatment of private[this] parameters is needed to avoid a misleading error message. Fortunately, we can determine this without forcing the info of the case class, by inspecting the parameter accessor trees. This change may allow us to resurrect the case class ProductN parentage, which was trialled but abandoned in the lead up to 2.10.0.
* | Merge commit '644eb7078a' into wip/fresh-merge2Paul Phillips2013-02-011-8/+1
|\| | | | | | | | | | | Conflicts: build.xml src/compiler/scala/tools/nsc/backend/jvm/GenJVM.scala
| * SI-7035 Centralize case field accessor sorting.Jason Zaugg2013-01-281-8/+1
| | | | | | | | | | | | It is both burdensome and dangerous to expect callers to reorder these. This was seen in the field permutation in the unapply method; a regression in 2.10.0.
* | Merge branch '2.10.x'Adriaan Moors2013-01-081-4/+16
|\| | | | | | | | | | | | | | | | | | | | | | | | | Patches applied: - rename of `dropRepeatedParamType` to `dropIllegalStarTypes` -- required since 8886d22cd6 - fixed test/files/neg/t6406-regextract.flags -- how could this have worked before? Conflicts: src/compiler/scala/tools/nsc/interpreter/TypeStrings.scala src/library/scala/collection/LinearSeqOptimized.scala src/library/scala/util/Properties.scala test/files/run/streams.check test/files/run/streams.scala
| * SI-6911, regression in generated case class equality.Paul Phillips2013-01-031-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | Caught out by the different semantics of isInstanceOf and pattern matching. trait K { case class CC(name: String) } object Foo extends K object Bar extends K Foo.CC("a") == Bar.CC("a") That expression is supposed to be false, and with this commit it is once again.
* | Removed unused imports.Paul Phillips2012-11-061-2/+0
| | | | | | | | | | | | | | | | | | 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".
* | Merge commit 'refs/pull/1574/head' into merge-210Paul Phillips2012-11-051-8/+44
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * Brings all copyrights (in comments) up-to-date, from 2011/12 to 2013Heather Miller2012-11-021-1/+1
| |
| * Merge pull request #1526 from paulp/value-classes/6534-equalsAdriaan Moors2012-11-011-1/+18
| |\ | | | | | | New take on SI-6534, value classes.
| | * Modification to SI-6534 patch.Paul Phillips2012-10-301-9/+11
| | | | | | | | | | | | | | | | | | Only exclude hashCode and equals from being overridden in value classes, not other synthetics which may turn up such as case class methods.
| | * New take on SI-6534, value classes.Paul Phillips2012-10-241-1/+16
| | | | | | | | | | | | | | | Don't prohibit equals and hashCode in universal traits; instead, always override them in value classes.
| * | SI-6578 Harden against synthetics being added more than once.Paul Phillips2012-10-301-6/+25
| |/ | | | | | | | | Don't add synthetic methods if they already contain synthetic methods from the set we're about to add.
* | Removing unused locals and making vars into vals.Paul Phillips2012-11-031-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Remove unused private members.Paul Phillips2012-11-011-6/+0
| | | | | | | | | | | | | | | | | | That's a lot of unused code. Most of this is pure cruft; a small amount is debugging code which somebody might want to keep around, but we should not be using trunk as a repository of our personal snippets of undocumented, unused, unintegrated debugging code. So let's make the easy decision to err in the removing direction. If it isn't built to last, it shouldn't be checked into master.
* | Merge branch 'merge-2.10.0-wip' into merge-2.10.xPaul Phillips2012-10-311-3/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * Disabled generation of _1, _2, etc. methods.Paul Phillips2012-10-221-3/+4
| | | | | | | | | | | | | | This was part of the introduction of ProductN, which had to go back into pandora's box because of issues with cycles during typing. These should have been reverted along with it.
* | Merge remote-tracking branch 'origin/2.10.x' into merge-210Paul Phillips2012-09-151-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/2.10.x: (68 commits) Eliminate breaking relative names in source. "Hot fix" for broken build. Fix SI-4813 - Clone doesn't work on LinkedList. Made 'def clone()' consistent with parens everywhere. accommodates pull request feedback SI-6310 redeploys the starr SI-6310 AbsTypeTag => WeakTypeTag SI-6323 outlaws free types from TypeTag SI-6323 prohibits reflection against free types improvements for reification of free symbols removes build.newFreeExistential SI-6359 Deep prohibition of templates in value class Fixes SI-6259. Unable to use typeOf in super call of top-level object. Fixes binary repo push for new typesafe repo layouts. Better error message for pattern arity errors. Rescued TreeBuilder from the parser. Pending test for SI-3943 Test case for a bug fixed in M7. Fix for SI-6367, exponential time in inference. SI-6306 Remove incorrect eta-expansion optimization in Uncurry ... Conflicts: src/compiler/scala/tools/nsc/transform/AddInterfaces.scala src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
| * Worked around SI-6161 by annotating abstract type.Paul Phillips2012-09-011-2/+2
| |
* | Merge remote-tracking branch 'origin/2.10.x' into merge-210Paul Phillips2012-08-171-2/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # By Eugene Burmako (12) and others # Via Paul Phillips (4) and others * origin/2.10.x: Fixes SI-6236. Fixes SI-6189. Hunting down eliminable :: allocations. Absolutize tools.nsc => scala.tools.nsc. more cleanup for typedMacroBody shaves more than 150 lines off typedMacroBody Optimization in SubstMap. removes dead code pull request feedback more macro cleanup further cleanup of transformTypeTagEvidenceParams macroImplSigs => macroImplSig Dominik's comments on api.Mirrors phaseId(currentPeriod) >= erasurePhase.id materializeImplicit and implicitsOfExpectedType cleanup of reflection- and macro-related stuff adds the `skipPackage` attribute to Scaladoc Fixes backend crash due to incorrect consumedTypes Fix SI-6208. mutable.Queue now returns mutable.Queue for collection methods rather than MutableList.
| * cleanup of reflection- and macro-related stuffEugene Burmako2012-08-151-2/+2
| | | | | | | | | | | | mostly removes [Eugene] marks that I left back then and reviews related code some of those tokens got left in place, because I don't know to how fix them without imposing risks on 2.10.0
* | Merge branch '2.10.x'Adriaan Moors2012-08-081-1/+1
|\| | | | | | | | | | | Conflicts: src/compiler/scala/tools/nsc/ast/TreeGen.scala src/compiler/scala/tools/nsc/settings/AestheticSettings.scala