summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* SI-5981, SI-5979, SI-5973 Closed. Maintenance to Try.Heather Miller2012-07-055-80/+330
|
* Merge pull request #821 from adriaanm/64acb46ab7Adriaan Moors2012-07-059-35/+109
|\ | | | | SI-5830 switches: support guards, unreachability
| * SI-5830 switches: support guards, unreachabilityAdriaan Moors2012-07-039-35/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | turn switches with guards into guard-free switches by collecting all cases that are (possibly) guarded by different guards but that switch on the same constant, and pushing the implied if-then-else into the collapsed case body ``` case C if G1 => B1 case C if Gi => Bi case C if GN => BN ``` becomes ``` case C => if (G1) B1 else if (Gi) Bi else if (GN) BN else default() // not necessary if GN == EmptyTree ``` default() is a jump to the default case; to enable this, we wrap a default() { } labeldef around the last case's body (the user-defined default or the synthetic case that throws the matcherror) so we can jump to the default case after the last guard is checked (assuming unreachability is checked, once we ended up in a non-default case, one of the guards either matches or we go to the default case) the unreachability analysis is minimal -- we simply check (after rewriting to guard-free form) that: - there are no duplicate cases - the default case comes last misc notes: - can't jump in exception handlers (TODO: a more fine-grained analysis on when we need to jump) - work around SI-6015 (test file run/t5830.scala crashed the inliner) - propagate type of case body to label def of default case (needed for existentials, see e.g., t2683) - the default(){} LabelDef breaks SelectiveANFTransform -- workaround: don't write guarded switches in CPS code (do the above transformation manually)
* | Merge pull request #777 from retronym/ticket/2796Adriaan Moors2012-07-043-0/+33
|\ \ | | | | | | SI-2796 Warn if early definitions are used with a trait.
| * | SI-2796 Warn if early definitions are used with a trait.Jason Zaugg2012-06-263-0/+33
| | | | | | | | | | | | For which they (currently) have no special meaning.
* | | Merge pull request #818 from scalamacros/topic/tags-for-anyval-and-anyrefAdriaan Moors2012-07-046-52/+76
|\ \ \ | | | | | | | | tags for AnyVal and AnyRef
| * | | tags for AnyVal and AnyRefEugene Burmako2012-07-046-52/+76
| | | |
* | | | Merge pull request #820 from retronym/ticket/6013Adriaan Moors2012-07-044-0/+31
|\ \ \ \ | | | | | | | | | | SI-6013 Disallow deferred members from intermediate java parents.
| * | | | SI-6013 Disallow deferred members from intermediate java parents.Jason Zaugg2012-07-044-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 76c76b28f allowed for the fact that a Java method can override a super class method without matching its type in a Scala sense; it need only match its type after erasure. However that change went too far, and considered a concrete method in a base class to override a deferred method in a subclass.
* | | | | Merge pull request #814 from hubertp/issue/5969Adriaan Moors2012-07-043-1/+19
|\ \ \ \ \ | | | | | | | | | | | | Closes SI-5969.
| * | | | | Closes SI-5969.Hubert Plociniczak2012-07-023-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Assumption that we enter tryTwice when inferring the right alternative with an empty buffer is wrong. In this particular bug it manifested itself on if/then/else which share the same context and 'else' branch was simply flushing the buffer with an error from the 'then' branch.
* | | | | | Merge pull request #809 from dragos/issue/fix-5929Adriaan Moors2012-07-041-0/+25
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix SI-5929 - Verify error with finally and pattern match
| * | | | | | Fix SI-5929 - Verify error with finally and pattern matchIulian Dragos2012-07-021-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't enter all labels in a method when emitting a forward jump, since some labels will be duplicated (if defined inside finally blocks). For each forward jump, enter only the label that is needed for that jump.
* | | | | | | Merge pull request #772 from magarciaEPFL/recoveringOptimizedStabilityCAdriaan Moors2012-07-041-73/+65
|\ \ \ \ \ \ \ | |_|_|_|/ / / |/| | | | | | recovering optimized stability
| * | | | | | inliner makes fields public only when actually inliningMiguel Garcia2012-06-251-73/+65
| | | | | | |
* | | | | | | SI-5990 u.build now correctly invokes missing symbol hooksEugene Burmako2012-07-032-0/+30
| |_|_|_|_|/ |/| | | | |
* | | | | | Merge pull request #810 from scalamacros/pullrequest/manifests-and-ticket6005Adriaan Moors2012-07-0369-195/+346
|\ \ \ \ \ \ | | | | | | | | | | | | | | two pullrequests from this morning, combined to merge changes to starrs
| * | | | | | reify no longer dealiases symbols and typesEugene Burmako2012-07-0235-105/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this uncovers a bug in toolboxes: https://issues.scala-lang.org/browse/SI-6007 however that bug is not critical, so it will be dealt with later
| * | | | | | removes ClassTag.String and TypeTag.StringEugene Burmako2012-07-028-38/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TypeTag.String is removed because it's unclear whether it should point to scala.Predef.String or to java.lang.String. ClassTag.String is removed to be consistent with TypeTag.String. This requires re-bootstrapping, because Definitions.scala in locker expects classTag[String] being automatically generated, whereas starr disagrees with locker on how to generate that class tag.
| * | | | | | further improves reflection printersEugene Burmako2012-07-0211-43/+46
| | | | | | |
| * | | | | | Improves backward compatibility of manifestsEugene Burmako2012-07-0215-9/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) type ClassManifest[T] = ClassTag[T] (solves a problem with toArray[T: ClassManifest] defined on most of the collections; if these types weren't aliases, then we won't be able to change the signature of that method to toArray[T: ClassTag], because that would break source compatibility for those who override toArray in their custom collections) 2) Compiler-generated manifests no longer trigger deprecation warnings (this is implemented by using ClassManifestFactory instead of ClassManifest and ManifestFactory instead of Manifest) 3) Deprecation messages got improved to reflect the changes that were introduced in 2.10.0-M4.
* | | | | | | Merge pull request #801 from paulp/issue/exponential-specAdriaan Moors2012-07-031-0/+47
|\ \ \ \ \ \ \ | |_|_|_|_|/ / |/| | | | | | Fix for exponential compile time in specialization.
| * | | | | | Fix for exponential compile time in specialization.Paul Phillips2012-06-301-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Review by @prokopec.
* | | | | | | Merge pull request #798 from retronym/ticket/2807-4Adriaan Moors2012-07-022-15/+27
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | SI-2807 Avoid catch all warning for Stable Id patterns
| * | | | | | SI-2807 Avoid catch all warning for Stable Id patternsJason Zaugg2012-06-302-15/+27
| | | | | | |
* | | | | | | Merge pull request #802 from retronym/ticket/5489Adriaan Moors2012-07-023-0/+20
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-5489 Avoid accidentally adding members to Object in erasure.
| * | | | | | | SI-5489 Avoid accidentally adding members to Object in erasure.Jason Zaugg2012-07-013-0/+20
| | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `Symbol#classBound` assumed that `refinedType` would return a a type based on new refinement class symbol; but that isn't so during erasure. Instead, it returns the first super class, into which we entered new members. Needless to say, the next run of the resident compiler didn't take kindly to these hijinks. To remedy the situation, I've added (yet another) condition on `phase.erasedTypes`.
* | | | | | | Merge pull request #771 from retronym/ticket/4176-2Adriaan Moors2012-07-022-0/+11
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-4176 A repeat dose of repeated parameter type sanitization.
| * | | | | | | SI-4176 A repeat dose of repeated parameter type sanitization.Jason Zaugg2012-06-302-0/+11
| | |_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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.
* | | | | | | SI-5932 Tone down non-sensible == warning with refinements.Jason Zaugg2012-07-012-0/+16
| |/ / / / / |/| | | | | | | | | | | | | | | | | Errs on the side of avoiding false positives.
* | | | | | Merge pull request #792 from jsuereth/fixup/from-reprJosh Suereth2012-06-292-22/+63
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | Split @milessabin HasRepr into IsTraversableOnce and IsTraversableLike t...
| * | | | | Split @milessabin HasRepr into IsTraversableOnce and IsTraversableLike type ↵Josh Suereth2012-06-272-22/+63
| | | | | | | | | | | | | | | | | | | | | | | | class-ish things.
* | | | | | Merge pull request #793 from jsuereth/fix/convert-toJosh Suereth2012-06-293-10/+10
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | Renaming convertTo to to on GenTraversableOnce.
| * | | | | Renaming convertTo to to on GenTraversableOnce.Josh Suereth2012-06-283-10/+10
| | | | | |
* | | | | | Merge branch 'master' into issue/5846,4597,4027,4112Aleksandar Prokopec2012-06-28124-506/+2247
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/library/scala/collection/MapLike.scala src/library/scala/collection/SortedMapLike.scala
| * \ \ \ \ \ Merge pull request #790 from axel22/issue/3326Josh Suereth2012-06-282-0/+82
| |\ \ \ \ \ \ | | |/ / / / / | |/| | | | | Fix SI-3326.
| | * | | | | Fix SI-3326.Aleksandar Prokopec2012-06-272-0/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The heart of the problem - we want to retain the ordering when using `++` on sorted maps. There are 2 `++` overloads - a generic one in traversables and a map-specific one in `MapLike` - which knows about the ordering. The problem here is that the expected return type for the expression in which `++` appears drives the decision of the overload that needs to be taken. The `collection.SortedMap` does not have `++` overridden to return `SortedMap`, but `immutable.Map` instead. This is why `collection.SortedMap` used to resort to the generic `TraversableLike.++` which knows nothing about the ordering. To avoid `collection.SortedMap`s resort to the more generic `TraverableLike.++`, we override the `MapLike.++` overload in `collection.SortedMap` to return the proper type `SortedMap`.
| * | | | | | Merge pull request #783 from phaller/topic/cps-return-revertAdriaan Moors2012-06-288-134/+0
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | Revert pull request #720 (CPS: enable return expressions in CPS code if ...
| | * | | | | | Revert pull request #720 (CPS: enable return expressions in CPS code if they ↵phaller2012-06-278-134/+0
| | | |_|_|_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | are in tail position) Reverts commit 0ada0706746c9c603bf5bc8a0e6780e5783297cf. Reverts commit 51c92f02229098d0b402a65a72267f7a17984022. Reverts commit cdfbe8e39fbbec00c969cd74f117ae410b98b40b. Reverts commit 796024c7429a03e974a7d8e1dc5c80b84f82467d.
| * | | | | | Merge pull request #786 from axel22/issue/5986-cherryJosh Suereth2012-06-273-2/+53
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | Fix SI-5986.
| | * | | | | | Fix SI-5986.Aleksandar Prokopec2012-06-273-2/+53
| | | |/ / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here we had an issue that RedBlack does not work the same way for sets - which are not supposed to replace an element if it is the same (wrt equals) and maps - which should replace the corresponding values. Adding an overwrite parameter which decides whether to overwrite added keys if they are the same in the ordering. Fix tests.
| * | | | | | Merge pull request #785 from axel22/feature/to-parJosh Suereth2012-06-272-1/+27
| |\ \ \ \ \ \ | | |_|_|/ / / | |/| | | | | Parallelize convertTo in parallel collection.
| | * | | | | Parallelize convertTo in parallel collection.Aleksandar Prokopec2012-06-272-1/+27
| | | |/ / / | | |/| | |
| * | | | | Merge pull request #787 from axel22/issue/5971Josh Suereth2012-06-272-0/+27
| |\ \ \ \ \ | | | | | | | | | | | | | | Fix SI-5971.
| | * | | | | Fix SI-5971.Aleksandar Prokopec2012-06-272-0/+27
| | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using `AbstractTransformed` abstract inner class in views in order to force generating bridges, one must take care to push the corresponding collection trait (such as `Iterable` or `Seq`) as far as possible to the left in the linearization order -- otherwise, overridden methods from these traits can override the already overridden methods in view. This was the case with `takeWhile`.
| * | | | | Merge pull request #782 from hubertp/issue/5839Adriaan Moors2012-06-272-0/+13
| |\ \ \ \ \ | | | | | | | | | | | | | | Test that closes SI-5839. Bug itself most probably fixed by #602
| | * | | | | Test that closes SI-5839. Bug itself most probably fixed by #602Hubert Plociniczak2012-06-272-0/+13
| | | |_|_|/ | | |/| | |
| * | | | | Merge pull request #754 from scalamacros/topic/removereflectcompatAdriaan Moors2012-06-273-4/+3
| |\ \ \ \ \ | | | | | | | | | | | | | | removes pre-M4 compatibility stubs for the IDE
| | * | | | | removes pre-M4 compatibility stubs for the IDEEugene Burmako2012-06-213-4/+3
| | | | | | |
| * | | | | | Merge pull request #780 from hubertp/topic/fix-rangepos-buildAdriaan Moors2012-06-272-0/+10
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | Fix range positions when applying anonymous classes.