summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix for rangepos crasher.Paul Phillips2012-12-041-2/+3
| | | | | wrapClassTagUnapply was generating an unpositioned tree which would crash under -Yrangepos. See SI-6338.
* SI-6685 fixes error handling in typedApplyEugene Burmako2012-11-301-3/+2
| | | | | | | | | | | When MissingClassTagError doesn't lead to an exception, but rather silently sets an error, we need to bubble the resulting erroneous tree up the responsibility chain instead of mindlessly typechecking this again. This wasn't an issue before, because as far as I can guess the aforementioned error setter was always throwing exceptions in the most common usage scenarios (therefore the typecheck-again-fail-again vicious loop wasn't triggered).
* Removing controversial `either` method from Futures API.Josh Suereth2012-11-211-23/+0
| | | | | * Removes `either` from Future * No tests need to change, since this was an untested method.
* Merge pull request #1607 from retronym/ticket/6640Josh Suereth2012-11-196-26/+61
|\ | | | | SI-6640 Better reporting of deficient classpaths.
| * SI-6440 Address regressions around MissingRequirementErrorJason Zaugg2012-11-136-15/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Go back to using globalError to report when a stub's info is referenced, and only throw the MissingRequirementError when compilation really must abort due to having a StubTermSymbol in a place where a StubClassSymbol would have been a better choice. This situation arises when an entire package is missing from the classpath, as was the case in the reported bug. Adds `StoreReporterDirectTest`, which buffers messages issued during compilation for more structured interrogation. Use this in two test for manifests -- these tests were using a crude means of grepping compiler console output to focus on the relevant output, but this approach was insufficient with the new multi-line error message emitted as part of this change. Also used that base test class to add two new tests: one for the reported error (package missing), and another for a simpler error (class missing). The latter test shows how stub symbols allow code to compile if it doesn't the subset of signatures in some type that refer to a missing class. Gave the INFO/WARNING/ERROR members of Reporter sensible toString implementations; they inherit from Enumeration#Value in an unusual manner (why?) that means the built in toString of Enumeration printed `Severity@0`.
| * Refine the message and triggering of MissingRequirementError.Jason Zaugg2012-11-103-3/+15
| | | | | | | | | | | | | | - To force a failure of the stub, call a new method `failIfStub` rather than `info`. - Offer a broader range of potential root causes in the error message.
| * SI-6640 Better reporting of deficient classpaths.Jason Zaugg2012-11-103-20/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a55788e, StubSymbols were introduced to fail-slow when the classpath was deficient. This allowed compilation to succeed in cases when one didn't actually use the part of class A which referred to some missing class B. But a few problems were introduced. Firstly, when the deferred error eventually happened, it was signalled with abort(msg), rather than through a thrown MissingRequirementError. The latter is desirable, as it doesn't lead to printing a stack trace. Second, the actual error message changed, and no longer included the name of the class file that refers to the missing class. Finally, it seems that we can end up with a stub term symbol in a situation where a class symbol is desired. An assertion in the constructor of ThisType throws trips when calling .isClass, before the useful error message from StubSymbol can be emitted. This commit addresses these points, and rewords the error a little to be more accessible. The last point is the most fragile in this arrangement, there might be some whack-a-mole required to find other places that also need this. I don't see a clean solution for this, but am open to suggestions. We should really build a facility in partest to delete specified classfiles between groups in separate compilation tests, in order to have tests for this. I'll work on that as a followup. For now, here's the result of my manual testing: [info] Set current project to default-821d14 (in build file:/Users/jason/code/scratch1/) > compile [info] Compiling 1 Scala source to /Users/jason/code/scratch1/target/scala-2.10/classes... [error] [error] while compiling: /Users/jason/code/scratch1/test.scala [error] during phase: typer [error] library version: version 2.10.0-RC2 [error] compiler version: version 2.10.0-RC2 ... [error] last tree to typer: Ident(SwingWorker) [error] symbol: <none> (flags: ) [error] symbol definition: <none> [error] symbol owners: [error] context owners: object Test -> package <empty> ... [error] uncaught exception during compilation: java.lang.AssertionError [trace] Stack trace suppressed: run last compile:compile for the full output. [error] (compile:compile) java.lang.AssertionError: assertion failed: value actors [error] Total time: 2 s, completed Nov 10, 2012 3:18:34 PM > > set scalaHome := Some(file("/Users/jason/code/scala/build/pack")) [info] Defining *:scala-home [info] The new value will be used by no settings or tasks. [info] Reapplying settings... [info] Set current project to default-821d14 (in build file:/Users/jason/code/scratch1/) ^[compile [info] Compiling 1 Scala source to /Users/jason/code/scratch1/target/scala-2.10/classes... [error] /Users/jason/code/scratch1/test.scala:4: A signature in SwingWorker.class refers to term actors in package scala which is missing from the classpath. [error] object Test extends SwingWorker [error] ^ [error] one error found [error] (compile:compile) Compilation failed [error] Total time: 2 s, completed Nov 10, 2012 3:18:45 PM
* | Merge pull request #1638 from adriaanm/ticket-6624Josh Suereth2012-11-191-1/+11
|\ \ | | | | | | SI-6624 better lookup of case field accessors for case class pattern with complicated type
| * | SI-6624 set info of case pattern binder to help find case field accessorsAdriaan Moors2012-11-161-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | sometimes the type checker infers a weird type for a sub-pattern of a case class/extractor pattern this confuses the pattern matcher and it can't find the case field accessors for the sub-pattern use the expected argument type of the extractor corresponding to the case class that we're matching as the info for the sub-pattern binder -- this type more readily admits querying its caseFieldAccessors
* | | Merge pull request #1636 from paulp/issue/6628Adriaan Moors2012-11-168-36/+20
|\ \ \ | | | | | | | | Fixes SI-6628, Revert "Fix for view isEmpty."
| * | | Fixes SI-6628, Revert "Fix for view isEmpty."Paul Phillips2012-11-158-36/+20
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit caf7eb6b56817fd1e1fbc1cf017f30e6f94c6bea. I don't have a better idea right now than wholesale reversion.
* | | | Merge pull request #1616 from retronym/backport/6559Adriaan Moors2012-11-161-1/+1
|\ \ \ \ | | | | | | | | | | SI-6559 Fix raw string interpolator: string parts which were after the first argument were still escaped
| * | | | Fix raw string interpolator: string parts which were after the first ↵Julien Richard-Foy2012-11-131-1/+1
| | |_|/ | |/| | | | | | | | | | argument were still escaped
* | | | Merge pull request #1615 from retronym/ticket/6648Adriaan Moors2012-11-161-0/+13
|\ \ \ \ | | | | | | | | | | SI-6648 copyAttrs must preserve TypeTree#wasEmpty
| * | | | SI-6648 copyAttrs must preserve TypeTree#wasEmptyJason Zaugg2012-11-141-0/+13
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This field tracks whether the type is an inferred on, subject to removal in `resetAttrs`, or an explicit type, which must remain. In ae5ff662, `ResetAttrs` was modified to duplicate trees, rather than mutate trees in place. But the tree copier didn't pass `wasEmpty` on to the new tree, which in turn meant that the subsequent typing run on the tree would not re-infer the types. If the type refers to a local class, e.g. the anonymous function in the enclosed test case, the reference to the old symbol would persist. This commit overrides `copyAttrs` in TypeTree to copy `wasEmpty`. We might consider representing this as a tree attachment, but this would need to be validated for the performance impact.
* | | | Merge pull request #1614 from phaller/issue/correct-promise-signatureAdriaan Moors2012-11-161-3/+2
|\ \ \ \ | |_|/ / |/| | | SI-6661 - Remove obsolete implicit parameter of scala.concurrent.promise method
| * | | SI-6661 - Remove obsolete implicit parameter of scala.concurrent.promise methodphaller2012-11-151-3/+2
| |/ / | | | | | | | | | | | | | | | | | | | | | Clarification of @heathermiller: This is an inconsistency introduced after refactoring implicit ExecutionContexts. In commit 1dfce90246f7d334 the implicit ExecutionContexts were removed from everything else in Promise.scala, but it appears that method promise was missed in the scala.concurrent package object, which would've made sense to remove back then.
* | | Merge pull request #1608 from retronym/ticket/6644Josh Suereth2012-11-141-3/+1
|\ \ \ | |_|/ |/| | SI-6644 Account for varargs in extmethod forwarder
| * | SI-6644 Account for varargs in extmethod forwarderJason Zaugg2012-11-101-3/+1
| |/ | | | | | | | | Which sounded difficult, so instead I offshored the work to the friendly republic of TreeGen.
* | Update comment.Jason Zaugg2012-11-131-1/+2
| |
* | SI-6646 `ident` or Ident is always new binding.Jason Zaugg2012-11-131-25/+59
| | | | | | | | | | | | | | | | | | | | | | The previous commit regressed in these cases: // no withFilter for (X <- List("A single ident is always a pattern")) println(X) for (`x` <- List("A single ident is always a pattern")) println(`x`) At the top level of the LHS of a <-, such identifiers represent new bindings, not stable identifier patterns.
* | SI-6646 Fix regression in for desugaring.Jason Zaugg2012-11-102-19/+28
|/ | | | | | The early check in the parser of pattern irrefutability, added in c82ecab, failed to consider InitCaps and `backquoted` identifiers.
* Merge pull request #1566 from densh/topic/asSeenFrom-exampleJosh Suereth2012-11-041-4/+20
|\ | | | | Fixes example in Type.asSeenFrom
| * Fixes example in Type.asSeenFromDen Shabalin2012-11-031-4/+20
| | | | | | | | | | | | It was written in some form of non-executable pseudo-code before and that might be quite confusing for people who are not familiar with scala reflection.
* | Merge pull request #1559 from heathermiller/copyright-updateJosh Suereth2012-11-041240-1249/+1248
|\ \ | |/ |/| Updated copyright dates throughout compiler and stdlib for upcoming release
| * Brings copyrights in Scaladoc footer and manpage up-to-date, from 2011/12 to ↵Heather Miller2012-11-022-2/+2
| | | | | | | | 2013
| * Brings all copyrights (in comments) up-to-date, from 2011/12 to 2013Heather Miller2012-11-021240-1247/+1246
| |
* | Merge pull request #1562 from paulp/issue/6600Josh Suereth2012-11-022-6/+15
|\ \ | | | | | | Fix for SI-6600, regression with ScalaNumber.
| * | Fix for SI-6600, regression with ScalaNumber.Paul Phillips2012-11-022-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not much in the end; I divided ScalaNumericConversions into two traits such that the ScalaNumericAnyConversions can be used in value classes, and ScalaNumericConversions can override methods in ScalaNumber (since one trait cannot do both those things.) The fact that ScalaNumber is privileged for equality but a) extends java.lang.Number and therefore b) cannot be a value class is something we will want to revisit real soon.
* | | SI-6562 Fix crash with class nested in @inline methodJason Zaugg2012-11-023-8/+17
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | e6b4204604 moved access widenings from ExplicitOuter to SuperAccessors to reflect them in pickled signatures so that the inliner can take advantage of them under separate compilation. The followup discussion [1] determined that this wasn't the right solution: while it enabled new separate compilation inlinings, it failed to widen access of outer pointers and hence prevented certain inlinings. A better solution was proposed: modify the inliner to know that access widening is guaranteed to have happened in ExplicitOuter for any field accessed by an @inline-d method body, rather than relying solely on the pickled types. But this hasn't happened yet. In the meantime 07f94297 / #1121 reinstated the access widening to SuperAccessors, but took a slightly different approach, using `Symbol#enclMethod` rather than `closestEnclMethod`. That deviation triggers SI-6562. This commit goes back to `closestEnclMethod`. [1] https://groups.google.com/forum/#!topic/scala-internals/iPkMCygzws4
* | SI-6606 Drops new icons in, replaces abstract types placeholder iconsHeather Miller2012-11-024-0/+0
| |
* | SI-6132 Revisited, cleaned-up, links fixed, spelling errors fixed, rewordingsHeather Miller2012-11-0226-194/+227
| |
* | Labeling scala.reflect and scala.reflect.macros experimental in the API docsHeather Miller2012-11-0238-56/+184
| | | | | | | | | | - Added the labels across scala.reflect and scala.reflect.macros - Added the styling in template.css that is used by all labels
* | Typo-fix in scala.concurrent.Future, thanks to @pavelpavlovHeather Miller2012-11-021-1/+1
| |
* | Remove implementation details from Position (they are still under ↵Hubert Plociniczak2012-11-021-29/+2
| | | | | | | | 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 AnyValHeather Miller2012-11-022-5/+51
|/ | | | | - Updates AnyVal docs to address value classes. - Updates Any docs to address universal traits.
* 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.
* | Merge pull request #1540 from odersky/ticket/6500Adriaan Moors2012-11-011-2/+4
|\ \ | | | | | | Fixes SI-6500 by making erasure more regular.
| * | Fixes SI-6500 by making erasure more regular.Martin Odersky2012-10-301-2/+4
| |/ | | | | | | | | | | With the introduction of value classes, erasure uses specialErasure where a value class C with underlying type T is unboxed to an ErasedValueType. ErasedValue types are eliminated on phase later, in post-erasure. This was done everywhere, except in the parameter types of bridge methods. That was a mistale, because that way bridge methods could not do the boxing/unboxing logic triggered by ErasedValueTypes. Note: there is one remaining use of erasure (not specialErasure) in Erasure.scala. I put in a comment why that is OK.
* | Merge pull request #1542 from adriaanm/odersky-ticket/6556v2Adriaan Moors2012-11-011-1/+13
|\ \ | | | | | | SI-6556 no assert for surprising ctor result type
| * | SI-6556 no assert for surprising ctor result typeMartin Odersky2012-10-301-1/+13
| |/ | | | | | | | | | | | | Previous fix to value classes uncovered some questionable cases in the backend where result types of constructor signatures are surprising. It's not a big deal because these types will be ignored afterwards anyway. But the method uncovered some questionable situations which we should follow up on. However, breaking 2.9 code because of this is way too harsh. That's why the asserts were converted to warnings. review by @paulp, @adriaanm
* | Removing actors-migration from main repository so it can live on elsewhere.Josh Suereth2012-11-011-74/+0
| | | | | | | | | | | | | | * Removes actors-migration hooks from partest * Removes actors-migration code * removes actors-migration tests * removes actors-migration distribution packaging.
* | Merge branch '2.10.0-wip' of github.com:scala/scala into 2.10.0-wipJosh Suereth2012-11-0110-35/+77
|\ \
| * \ Merge pull request #1543 from adriaanm/paulp-add-synthetics-onceJosh Suereth2012-10-311-6/+25
| |\ \ | | | | | | | | SI-6578 Harden against synthetics being added more than once.
| | * | 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.
| * | Merge pull request #1536 from vjovanov/issues/SI-6581Josh Suereth2012-10-312-6/+6
| |\ \ | | | | | | | | SI-6581 fixed by inlining `Actor.self`.
| | * | SI-6581 fixed by inlining `Actor.self`.Vojin Jovanovic2012-10-302-6/+6
| | |/ | | | | | | | | | | | | | | | This avoids the necessary type cast that was preventing leakage of internal migration classes. Review by @phaller
| * | Merge pull request #1532 from hubertp/2.10.0-wip-issue/5031Josh Suereth2012-10-312-3/+7
| |\ \ | | | | | | | | Fixes SI-5031 for separate compilation scenario.