summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* adds the sha1 files of the new starr / stringContext.fDominik Gruntz2012-07-068-8/+8
| | | | | | | | This commit provides the new sha1 codes of the new STARR. Moreover, it replaces the implementation of StringContext.f to `macro ???`. The implementation is magically hardwired into `scala.tools.reflect.MacroImplementations.macro_StringInterpolation_f` by the new STARR.
* Merge pull request #830 from heathermiller/topic/tryeither-fixesAdriaan Moors2012-07-065-80/+330
|\ | | | | SI-5981, SI-5979, SI-5973, SI-5890 Closed. Maintenance to Try.
| * SI-5981, SI-5979, SI-5973 Closed. Maintenance to Try.Heather Miller2012-07-055-80/+330
| |
* | Merge pull request #824 from adriaanm/ticket-4691_6008Adriaan Moors2012-07-066-1/+61
|\ \ | | | | | | [SI-4691, SI-6008] improve patmat analyses: irrefutable user-defined extractors, no-op type tests
| * | SI-6008 use static knowledge of success of type testsAdriaan Moors2012-07-053-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | augment the equality axioms to take into account that a type test against the static type of a variable succeeds unless the variable is null for exhaustivity we disregard null, so the type test always succeeds during unreachability we model this knowledge as the obvious implication
| * | SI-4691 exhaustivity: `unapply: Some` = irrefutableAdriaan Moors2012-07-053-0/+47
| |/ | | | | | | overhauls treeMakersToConds in the process -- was getting a bit unwieldy
* | Merge pull request #826 from lrytz/t5907Adriaan Moors2012-07-064-5/+152
|\ \ | | | | | | SI-5907, SI-5009 case-class copy defaults only for first param list
| * | SI-5907, SI-5009 case-class copy defaults only for first param listLukas Rytz2012-07-054-5/+152
| | | | | | | | | | | | | | | `copy` no longer returns anonymous functions if there are multiple parameter lists, reverts most of 40e7cab7a2. Cleaned up the special type completer for copy methods.
* | | Merge pull request #822 from scalamacros/ticket/5959Adriaan Moors2012-07-062-0/+75
|\ \ \ | | | | | | | | SI-5959 type equality now accounts for mirrors
| * | | SI-5959 type equality now accounts for mirrorsEugene Burmako2012-07-042-0/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TypeRef(ThisType(<package1>), sym, args) should always be equal to TypeRef(ThisType(<package2>), sym, args) regardless of whether package1 and package2 actually represent the same symbols of not. This goes for subtyping (<:<) and type equality (=:=). However regular equality (==) and hashconsing is unaffected as per http://groups.google.com/group/scala-internals/browse_thread/thread/4bef4e6987bb68fe This is done to account for the fact that mirrors share normal symbols, but never share package symbols. Therefore at times it will occur that the same types loaded by different mirrors appear different because of the package symbols. More details: https://issues.scala-lang.org/browse/SI-5959.
* | | | SI-6033 Closed. Provides implicit conversion from java.math.BigInteger to BigIntDominik Gruntz2012-07-051-0/+5
| |_|/ |/| |
* | | 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.