summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* SI-5914 handle null in classtag extractorAdriaan Moors2012-06-262-0/+10
|
* SI-2442 fixed by virtpatmat -- test files onlyAdriaan Moors2012-06-264-0/+18
|
* SI-5761: fix up #774 (missing check file)Adriaan Moors2012-06-261-0/+16
|
* Merge pull request #774 from hubertp/issue/5761Adriaan Moors2012-06-261-0/+16
|\ | | | | Added test for SI-5761.
| * Added test for SI-5761.Hubert Plociniczak2012-06-261-0/+16
| | | | | | | | | | Seems that my cleanup of SI-4842 also fixed that one. Review by @paulp or @retronym.
* | fix for SI-4935Miguel Garcia2012-06-263-0/+11
|/
* Merge pull request #769 from hubertp/topic/t4842-followupAdriaan Moors2012-06-265-11/+11
|\ | | | | Minor followup on SI-4842: remove awkward condition. Review by @retronym
| * Minor followup on SI-4842: remove awkward condition. Review by @retronym.Hubert Plociniczak2012-06-255-11/+11
| |
* | Merge pull request #760 from retronym/ticket/5966-3Adriaan Moors2012-06-252-0/+12
|\ \ | | | | | | SI-5966 Fix eta expansion for repeated parameters with zero arguments.
| * | SI-5966 Fix eta expansion for repeated parameters with zero arguments.Jason Zaugg2012-06-232-0/+12
| | | | | | | | | | | | | | | 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.
* | | Merge pull request #767 from retronym/ticket/5968Adriaan Moors2012-06-252-0/+9
|\ \ \ | | | | | | | | SI-5968 Eliminate spurious exhaustiveness warning with singleton types.
| * | | SI-5968 Eliminate spurious exhaustiveness warning with singleton types.Jason Zaugg2012-06-232-0/+9
| | | | | | | | | | | | | | | | A singleton type is a type ripe for enumeration.
* | | | Merge pull request #733 from retronym/ticket/4989-3Adriaan Moors2012-06-242-0/+75
|\ \ \ \ | |/ / / |/| | | SI-4989 Reject super.x if an intermediate class declares x abstract.
| * | | SI-4989 Reject super.x if an intermediate class declares x abstract.Jason Zaugg2012-06-172-0/+75
| | | | | | | | | | | | | | | | | | | | This is in line with Java's treatment. Without this, an AbstractMethodError is thrown at runtime.
* | | | Merge pull request #756 from axel22/issue/4809Josh Suereth2012-06-221-0/+34
|\ \ \ \ | | | | | | | | | | Fix SI-4809.
| * | | | Fix SI-4809.Aleksandar Prokopec2012-06-211-0/+34
| | | | |
* | | | | Merge pull request #755 from axel22/issue/5284-cherry-pickedAdriaan Moors2012-06-227-1/+87
|\ \ \ \ \ | |_|_|_|/ |/| | | | Fix SI-5284.
| * | | | Fix SI-5284.Aleksandar Prokopec2012-06-217-1/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was the false assumption that methods specialized on their type parameter, such as this one: class Foo[@spec(Int) T](val x: T) { def bar[@spec(Int) S >: T](f: S => S) = f(x) } have their normalized versions (`bar$mIc$sp`) never called from the base specialization class `Foo`. This meant that the implementation of `bar$mIc$sp` in `Foo` simply threw an exception. This assumption is not true, however. See this: object Baz { def apply[T]() = new Foo[T] } Calling `Baz.apply[Int]()` will create an instance of the base specialization class `Foo` at `Int`. Calling `bar` on this instance will be rewritten by specialization to calling `bar$mIc$sp`, hence the error. So, we have to emit a valid implementation for `bar`, obviously. Problem is, such an implementation would have conflicting type bounds in the base specialization class `Foo`, since we don't know if `T` is a subtype of `S = Int`. In other words, we cannot emit: def bar$mIc$sp(f: Int => Int) = f(x) // x: T without typechecking errors. However, notice that the bounds are valid if and only if `T = Int`. In the same time, invocations of `bar$mIc$sp` will only be emitted in callsites where the type bounds hold. This means we can cast the expressions in method applications to the required specialized type bound. The following changes have been made: 1) The decision of whether or not to create a normalized version of the specialized method is not done on the `conflicting` relation anymore. Instead, it's done based on the `satisfiable` relation, which is true if there is possibly an instantiation of the type parameters where the bounds hold. 2) The `satisfiable` method has a new variant called `satisfiableConstraints`, which does unification to figure out how the type parameters should be instantiated in order to satisfy the bounds. 3) The `Duplicators` are changed to transform a tree using the `castType` method which just returns the tree by default. In specialization, the `castType` in `Duplicators` is overridden, and uses a map from type parameters to types. This map is obtained by `satisfiableConstraints` from 2). If the type of the expression is not equal to the expected type, and this map contains a mapping to the expected type, then the tree is cast, as discussed above. Additional tests added. Review by @dragos Review by @VladUreche Conflicts: src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala src/compiler/scala/tools/nsc/typechecker/Duplicators.scala
* | | | | Merge pull request #752 from retronym/topic/warn-catch-all-4Adriaan Moors2012-06-224-3/+33
|\ \ \ \ \ | |_|_|_|/ |/| | | | SI-2807 Resurrect and refine the promiscuous catch warning.
| * | | | SI-2807 Resurrect and refine the promiscuous catch warning.Jason Zaugg2012-06-194-3/+33
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous incarnation didn't survive 4fb3473. This version can be cleared by using a typed pattern: `catch { case _: Throwable => }`. This is motivated by the recent appearance of such a catch in `util.Try`, and by battle scars left by one too many processes bravely but stupidly catching and logging OutOfMemoryErrors. -Y status has been skipped: this warning is enabled by default and can only be silenced with use of a typed pattern.
* | | | Merge pull request #753 from vjovanov/actor-tests-fixAdriaan Moors2012-06-2118-0/+1081
|\ \ \ \ | | | | | | | | | | Making Actor Migration Tests deterministic.
| * | | | Making Actor Migration Tests deterministic.Vojin Jovanovic2012-06-2018-0/+1081
| | |/ / | |/| | | | | | | | | | Review by: @phaller
* | | | Merge pull request #748 from jsuereth/update-scalacheck-sourceAdriaan Moors2012-06-212-2/+1
|\ \ \ \ | | | | | | | | | | Updated scalacheck sources.
| * | | | Updated scalacheck sources.Paul Phillips2012-06-192-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To current scalacheck head 7ffda752d8 except for this diff: diff -rw src/scalacheck/org/scalacheck/Arbitrary.scala /s/scalacheck/src/main/scala/org/scalacheck/Arbitrary.scala 13d12 < import scala.reflect.ClassTag 281c280 < implicit def arbArray[T](implicit a: Arbitrary[T], c: ClassTag[T] --- > implicit def arbArray[T](implicit a: Arbitrary[T], c: ClassManifest[T] diff -rw src/scalacheck/org/scalacheck/Prop.scala /s/scalacheck/src/main/scala/org/scalacheck/Prop.scala 63c63 < def mainCallsExit = false --- > def mainCallsExit = true Only in /s/scalacheck/src/main/scala/org/scalacheck: ScalaCheckFramework.scala diff -rw src/scalacheck/org/scalacheck/util/Buildable.scala /s/scalacheck/src/main/scala/org/scalacheck/util/Buildable.scala 13d12 < import scala.reflect.ClassTag 34c33 < implicit def buildableArray[T](implicit cm: ClassTag[T]) = --- > implicit def buildableArray[T](implicit cm: ClassManifest[T]) =
* | | | | Merge pull request #735 from retronym/ticket/4842-2Adriaan Moors2012-06-215-0/+40
|\ \ \ \ \ | | | | | | | | | | | | SI-4842 Forbid access to in-construction this in self-constructor args
| * | | | | SI-4842 Forbid access to in-construction this in self-constructor argsJason Zaugg2012-06-175-0/+40
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | The check was already in place for direct calls to the super constructor. Without this additional check, ExplicitOuter crashes, as it doesn't create an $outer pointer for the constructor-arg scoped inner object, but expects one to exist when transforming the Outer.this reference.
* | | | | Merge pull request #731 from retronym/ticket/5617Adriaan Moors2012-06-213-5/+37
|\ \ \ \ \ | |_|_|/ / |/| | | | SI-5617 Better error message for "x overrides nothing".
| * | | | SI-5617 Better error message for "x overrides nothing".Jason Zaugg2012-06-173-5/+37
| |/ / / | | | | | | | | | | | | "It looks like you're trying to override a method", notes Clippy.
* | / / Fix for SI-5953, extension methods crasher.Paul Phillips2012-06-191-0/+16
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As usual, .tpe -> .tpeHK. As a side note following an old theme, if symbols of type parameters knew that they were symbols of type parameters, they could call tpeHK themselves rather than every call site having to do it. It's the operation which injects dummies which should require explicit programmer action, not the operation which faithfully reproduces the unapplied type. Were it that way, errors could be caught much more quickly via ill-kindedness. Seems like an improvement over lurking compiler crashes at every call to tparam.tpe.
* | | Merge pull request #743 from axel22/issue/4541Adriaan Moors2012-06-194-0/+46
|\ \ \ | | | | | | | | Fix SI-4541.
| * | | Fix SI-4541.Aleksandar Prokopec2012-06-184-0/+46
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Catch type errors when duplicating trees. In this case, to access a protected member from a specialized class is an error, so we would have to make the member public anyway. Better it is then to report an error and have the user make the field public explicitly. Review by @dragos.
* | | Merge pull request #723 from paulp/topic/5910Adriaan Moors2012-06-191-0/+2
|\ \ \ | | | | | | | | Fix for java parser edge case.
| * | | Fix for java parser edge case.Paul Phillips2012-06-141-0/+2
| | | | | | | | | | | | | | | | Empty statements are A-OK. Closes SI-5910. Review by @dragos.
* | | | Merge pull request #737 from scalamacros/topic/reifyanonymousAdriaan Moors2012-06-194-8/+0
|\ \ \ \ | | | | | | | | | | enables reification of anonymous classes
| * | | | enables reification of anonymous classesEugene Burmako2012-06-184-8/+0
| | |/ / | |/| |
* | | | Merge pull request #729 from scalamacros/topic/showrawAdriaan Moors2012-06-1916-0/+107
|\ \ \ \ | | | | | | | | | | improve showRaw
| * | | | improves showRawEugene Burmako2012-06-1916-0/+107
| | |/ / | |/| | | | | | | | | | addresses concerns raised in http://groups.google.com/group/scala-user/browse_thread/thread/de5a5be2e083cf8e
* | | | Merge pull request #697 from retronym/ticket/4270-3Adriaan Moors2012-06-194-0/+45
|\ \ \ \ | | | | | | | | | | SI-4270 Disqualify in scope implicits that are shadowed.
| * | | | SI-4270 Disqualify in scope implicits that are shadowed.Jason Zaugg2012-06-104-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If an expression wouldn't type check explicitly, it shouldn't be allowed implicitly. Employs typedIdent, which already does this sort of thing rather well, instead of continuing to reimplement it in Implicits. Remove check for non-implicit synonym, which is subsumed by typing an Ident. Workaround Scaladoc oddity, by using an attributed select when the context is deficient.
* | | | | Merge pull request #739 from jsuereth/feature/collection-conversionsJosh Suereth2012-06-183-1/+167
|\ \ \ \ \ | | | | | | | | | | | | Adding copyInto and toVector methods to collections.
| * | | | | Migrate build to @odersky's suggestion of convertTo.Josh Suereth2012-06-182-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move method into TraversableOnce from Iterator and Traversable to make the build pass. * Udpate IDE tests with new collection methods. * Rewire default toXYZ methods to use convertTo.
| * | | | | Rename copyTo to build based on consensus of 3Josh Suereth2012-06-181-7/+7
| | | | | |
| * | | | | Fixes from review.Josh Suereth2012-06-181-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fixed typo * Renamed copyInto to copyTo * Added tparam doc.
| * | | | | Adding copyInto and toVector methods to collections.Josh Suereth2012-06-182-0/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Added generic copyInto method for collections. For any collection with a CanBuildFrom, can convert a generic collection into it using the builder. * Added specifici toVector method for collections. This is more efficient than copyInto if the collection is a Vector.
* | | | | | Merge pull request #741 from axel22/issue/4954Josh Suereth2012-06-181-0/+45
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix SI-4954.
| * | | | | | Fix SI-4954.Aleksandar Prokopec2012-06-181-0/+45
| | |_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Override inner classes in `LinkedHashMap` that correspond to `filterKeys`, `mapValues` and `keys` to retain a proper ordering of elements when they are transformed.
* | | | | | Merge pull request #742 from axel22/feature/pc-ctrieJosh Suereth2012-06-181-4/+7
|\ \ \ \ \ \ | | | | | | | | | | | | | | Use `ThreadLocalRandom` in `TrieMap.size`.
| * | | | | | Use `ThreadLocalRandom` in `TrieMap.size`.Aleksandar Prokopec2012-06-181-4/+7
| |/ / / / /
* | | | | | Merge pull request #720 from phaller/cps-ticket-1681Josh Suereth2012-06-188-0/+134
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | CPS: enable return expressions in CPS code if they are in tail position
| * | | | | Replace context stack of AnnotationChecker with new mode for typing returnsphaller2012-06-152-0/+31
| | | | | |