summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | Use -Dupdate.versions to update versions.propertiesAdriaan Moors2013-11-261-0/+21
| | | | | | |
* | | | | | | Merge pull request #3216 from xeno-by/topic/macro-error-messagesAdriaan Moors2013-12-0315-76/+84
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | better error messages for various macro definition errors
| * | | | | | | better error messages for various macro definition errorsEugene Burmako2013-12-0315-76/+84
| | | | | | | |
* | | | | | | | Merge pull request #3213 from Ichoran/issue/8014Adriaan Moors2013-12-032-1/+52
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Fixes SI-8014, regression in Vector ++ TraversableOnce.
| * | | | | | | | Fixes SI-8014, regression in Vector ++ TraversableOnce.Rex Kerr2013-12-022-1/+52
| | |_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now uses the cached copy instead of the exhausted iterator. Adds a JUnit test for ++.
* | | | | | | | Merge pull request #3202 from retronym/topic/function1-tuplenAdriaan Moors2013-12-0310-8/+119
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Diminished Tuple Confusion
| * | | | | | | | Better error messages for common Function/Tuple mistakesJason Zaugg2013-12-0110-8/+119
| | |_|_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Firstly, for `((a, b) => c): (Tuple2[A, B] => C)`, we currently just offer "missing parameter type." Is something of a rite of passage to know that you need `{ case (...)}` This commit stops short DWIM, but does offer a diagnostic to guide the user towards the supported way of destructuring a `Tuple` in the sole argument of a `Function1`. Secondly, another (less common?) way one might try to write a function to destructure a single tuple argument is: (((a, b)) => c) The parser now matches offers a specific error message for this, and points out the alternatives. In both cases, we avoid offering syntactically invalid alternatives, by detecting names that aren't valid as variable-patterns, and falling back to generic "paramN" in the error message. A handly utility function to sequence a list of options is liberated from the pattern matcher for broader use.
* | | | | | | | Merge pull request #3215 from retronym/ticket/7373Adriaan Moors2013-12-031-1/+1
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | SI-7373 Make the constructor of Vector non-public
| * | | | | | | | SI-7373 Make the constructor of Vector non-publicJason Zaugg2013-12-031-1/+1
| | |/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The danger of: new Vector(1, 2, 3).toString java.lang.NullPointerException and the "should have been private all along" argument call for a break in the source compatibility policy here.
* | | | | | | | Merge pull request #3212 from retronym/ticket/8023Adriaan Moors2013-12-034-12/+42
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | SI-8023 Fix symbol-completion-order bug of type var patterns
| * | | | | | | SI-8023 Address review comments around typedHigherKindedTypeJason Zaugg2013-12-033-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Make `WildCardType` kind polymorphic - Factory methods for expected kinds. They are still just `Type`-s, though. - Check if the type parameter is initialized, rather than its owner. - Take advantage of these to cleanup `typedAppliedTypeTree` TODO: is this comment totally accurate? If so, should we refactor `Kind.FromParams(tparams)` to `Kind.Arity(tparams.length)`? // @M: kind-arity checking is done here and in adapt, // full kind-checking is in checkKindBounds (in Infer)
| * | | | | | | SI-8023 Fix symbol-completion-order type var pattern bugJason Zaugg2013-12-022-7/+37
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removing the `isComplete` check altogether leads to cycles in, for instatnce, F-bound type parameters: trait LSO[+A, +Repr <: LSO[A, Repr]] // error: illegal cyclic reference involving type Repr But, I believe that we can (and must) eagerly initialize the type parameter symbols if we are typechecking a pattern. While this appeared to regress in 2.11.x, but the problem was in fact dormant and was merely uncovered in the fix for SI-7756, 3df1d77fc.
* | | | | | | Merge pull request #3207 from retronym/ticket/8022Adriaan Moors2013-12-022-6/+36
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | SI-8022 Backwards compatibility for Regex#unapplySeq
| * | | | | | SI-8022 Backwards compatibility for Regex#unapplySeqJason Zaugg2013-12-012-6/+36
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The change in ce1bbfe / SI-6406 introduced overloads of `unapplySeq` with wider static and dynmaic result types than the now-deprecated alternative that accepted `Any`. This is subtly source incompatible and the change was noticed in Specs2. This commit uses `List` as the static and runtime type for the new overloads. For consistency, the same is done for the new method added in SI-7737 / 93e9623.
* | | | | | Merge pull request #3201 from adriaanm/test-rm-androidJason Zaugg2013-11-282-27/+0
|\ \ \ \ \ \ | | | | | | | | | | | | | | Remove unused android tests.
| * | | | | | Remove unused android tests.Adriaan Moors2013-11-282-27/+0
|/ / / / / /
* | | | | | Merge pull request #3193 from adriaanm/releastarrAdriaan Moors2013-11-279-741/+605
|\ \ \ \ \ \ | |/ / / / / |/| | | | | No longer support unreleased STARR.
| * | | | | Rename build-support.xml to build-ant-macros.xml.Adriaan Moors2013-11-262-1/+1
| | | | | |
| * | | | | No longer support unreleased STARR.Adriaan Moors2013-11-257-205/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The STARR ("stable reference") compiler is used to bootstrap the compiler. It is now always resolved from maven, based on the `starr.version` property (stored in `versions.properties`). Before, we used the `.desired.sha1` mechanism to pull a set of jars that define the compiler used to build locker ("local reference"), which then builds quick. From now on, we only support officially released versions of STARR. Milestones are allowed of course, which means that, instead of breaking change, STARR evolution must support old and new behavior for at least one milestone cycle. For local development, use the `replacestarr` target as before. It builds quick (core only) and publishes it to your local maven repo with a generated version number, which is saved as `starr.version` in `build.properties` for convenience (overriding `versions.properties`), so that your next build will use this version of the compiler for STARR. You may now think of STARR as STAble Reference Release -- if you will.
| * | | | | Move all macros in build.xml to build-support.xml.Adriaan Moors2013-11-253-538/+550
| | | | | | | | | | | | | | | | | | | | | | | | No functional changes -- in an effort to separate state from behavior.
* | | | | | Merge pull request #3197 from retronym/merge/2.10.x-positions-to-masterJason Zaugg2013-11-2610-8/+178
|\ \ \ \ \ \ | | | | | | | | | | | | | | Merge 2.10.x, and PR #3196, to master
| * \ \ \ \ \ Merge remote-tracking branch 'origin/pr/3196' into ↵Jason Zaugg2013-11-2610-8/+178
| |\ \ \ \ \ \ | | | |_|_|_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | merge/2.10.x-positions-to-master Conflicts: src/compiler/scala/tools/nsc/typechecker/Typers.scala test/files/neg/applydynamic_sip.check - Changes two calls from `.endOrPoint` to `.point`. The latter is safe in master for both `Range`- and `OffsetPosition`s - Updates checkfiles with unrelated position changes (constructors)
| | * | | | | SI-8005 Fixes NoPositon error for updateDynamic callsSimon Schaefer2013-11-263-1/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously there occurred a NoPosition error when one asks for position information in the AST because no positions were set to the trees created during the transformation for updateDynamic calls. This commit applies range positions to the trees in order to being able to highlight them inside of the scala-ide.
| | * | | | | SI-8004 Resolve NoPosition error for applyDynamicNamed method callSimon Schaefer2013-11-263-2/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, there were no positions created for the tuples that are generated while doing the transformation for an applyDynamicNamed call. This led to an NoPosition error in scalac when one tries to show position information in the AST. Furthermore, this simplifies semantic highlighting in the scala-ide because no position information for color ranges have to be created anymore.
| | * | | | | SI-7463,SI-8003 Correct wrong position for {select,apply}Dynamic callsSimon Schaefer2013-11-266-5/+86
| | | |_|_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new positions are range positions that directly refer to the beginning and the end of the method calls in the sources instead of simply point to the beginning of the expression. This allows the scala-ide to semantically highlight select- and applyDynamic method calls, because it has only to traverse the tree and apply the color ranges to the given position ranges. This also fixes the position marker of an error messages related to a wrong Dynamic method signature.
| * | | | | Merge remote-tracking branch 'origin/2.10.x' into ↵Jason Zaugg2013-11-260-0/+0
| |\| | | | | | |_|/ / | |/| | | | | | | | merge/2.10.x-positions-to-master
| | * | | Merge pull request #3166 from skyluc/issue/completion-import-object-7280-210Jason Zaugg2013-11-2229-53/+1031
| | |\ \ \ | | | | | | | | | | | | Backport of
| | | * | | [nomaster] SI-7280 Scope completion not returning members provided by importsLuc Bourlier2013-11-214-25/+248
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updates localeContext() to return the best context possible when there are none directly associated with the given position. It happens when an expression cannot be successfully typed, as no precise ContextTree covers the expression location, or if the position is not inside any expression. Adds corresponding tests (cherry picked from commit 3028327e2a2b553b12ee45519413515c8aa0865f)
| | | * | | [nomaster] Adds test cases for scope completionLuc Bourlier2013-11-2112-0/+707
| | | | | | | | | | | | | | | | | | | | | | | | (cherry picked from commit 3d55fe723f1af91f4d2db421f0e0965c583346dc)
| | | * | | [nomaster] Test infrastructure for scope completionJason Zaugg2013-11-2113-28/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a new marker /*_*/ to trigger scope completion test. Original type completion test oracles update for the tweaked output (cherry picked from commit 9c7c66ff7907e3ab814f0f4375eeaf6cdd230d5e)
| | * | | | Merge pull request #3157 from dotta/backport/2.10.x/si-7915Jason Zaugg2013-11-214-3/+34
| | |\ \ \ \ | | | |/ / / | | |/| | | Backport of SI-7915
| | | * | | SI-7915 Corrected range positions created during default args expansionMirco Dotta2013-11-194-3/+34
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tree created during expansion of default arguments contained trees with the wrong type of positions. Let's discuss this with an example. Below is the tree generated for the `foo` method in the test class included in this commit. Before this commit: ``` [54:94]def foo(): [58]Unit = <70:90>{ [70:79]<artifact> val qual$1: [70]Bar = [70:79][70:79][70:79]new [74:77]Bar(); [80]<artifact> val x$1: [80]Int = [80]qual$1.bar$default$1; <70:90><70:83>qual$1.bar([80]x$1) } ``` Now: ``` [54:99]def foo(): [58]Unit = <70:95>{ <70:84><artifact> val qual$1: [70]Bar = [70:84][70:84][70:84]new [74:77]Bar(); [85]<artifact> val x$1: [85]Int = [85]qual$1.bar$default$1; <70:95>[84:88]qual$1.bar([85]x$1) } ``` Here are the list of changes: * The synthetic `qual$1` has a transparent position, instead of a range position. * The new Select tree (i.e., `qual$1.bar`) should always have a range position, because `selected` (i.e., the called method) is always visible in the source (in fact, this is the whole point of the fix, we need a range position or hyperlinking request from the Scala IDE won't work). * The Block that contains the expanded default arguments is forced to have a transparent position, as it never exist in the original source. The tricky part of the fix is the position assigned to the new Select tree, which needs to respect the range position's invariants. In the specific case, we ought to make sure that range positions don't overlap. Therefore, the position assigned to the new Select tree is computed by intersecting the original Select position (i.e., `baseFun`'s position) and the original qualifier's position (i.e., `qual`'s position). If you take a closer look at the range positions assigned in the tree after this commit, you'll notice that the range position of the `qual$1`'s rhs (i.e., [70:84]), and `qual$1.bar` (i.e., [84:88]) might seem to overlap, because the former ends where the latter begins. However, this not the case because of the range position's invariant 2, which states: > Invariant 2: in a range position, start <= point < end Hence, the above two positions aren't overlapping as far as the compiler is concerned. One additional aspect (that may look like a detail) is that we make sure to never generate a position such that its start is after its end. This is why we take the position with the smallest end point. Furthermore, calling `withStart` would turn any position in a range position, which isn't desiderable in general (and, even worse, this can lead to generation of invalid positions - bad offsets - if the computation is performed on offset positions). Hence, the position's computation is only performed when both `baseFun` and `qual` positions are range positions. Indeed, I expect this to be always the case if the compiler is started with -Yrangepos. (cherry picked from commit 3009a525b58a4c7865ff524899b85518884ee5f7)
* | | | | Merge pull request #3189 from retronym/ticket/8002Jason Zaugg2013-11-264-1/+50
|\ \ \ \ \ | | | | | | | | | | | | private access for local companions
| * | | | | SI-8002 private access for local companionsJason Zaugg2013-11-244-1/+50
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | We go through similar gymnastics to make companion implicits work for local class/object pairings, so we ought to be consistent when it comes to access
* | | | | Merge pull request #3192 from retronym/ticket/4332Jason Zaugg2013-11-267-0/+142
|\ \ \ \ \ | | | | | | | | | | | | SI-4332 Plugs the gaps in views
| * | | | | SI-4332 Plugs the gaps in viewsJason Zaugg2013-11-267-0/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These currently result in runtime errors: scala> List(1).view.distinct.force java.lang.UnsupportedOperationException: SeqView(...).newBuilder scala> List(1).view.inits.toList java.lang.UnsupportedOperationException: SeqView(...).newBuilder Two tests are enclosed: 1. reflect on the views to make any method that returns `Repr` is overriden in `*ViewLike`. This guards against new additions to the collections API. 2. exercise the newly added overrides Some care is needed with `tail`, we must re-override it in `mutable.IndexedSeqView` to be explicit about the end point of the slice, because the `IndexedSeqView#Sliced` defines length in terms of that. (Higher up the chain, it is just `iterator.size`, that's why `SeqView#tail` just sets up a slice from `1 to Int.MaxValue`.) Parallel collections views are not touched, as these are likely to be deprecated or removed shortly. Before this change, the test reported the following. Not all of these methods were buggy. For instance, `sortBy`, `sortWith` are implemented in terms of `sorted` which was implemented in `SeqViewLike`. Even in those cases, I have opted to override the methods in the `ViewLike` to guard against changes in the base class implementation and to simplify the rules in the test. ====================================================================== Checking scala.collection.TraversableView ====================================================================== trait TraversableLike ---------------------------------------------------------------------- def filterNot(p: A => Boolean): Repr def inits: Iterator[Repr] def tails: Iterator[Repr] override def tail: Repr ====================================================================== Checking scala.collection.IterableView ====================================================================== trait IterableLike ---------------------------------------------------------------------- def dropRight(n: Int): Repr def sliding(size: Int): Iterator[Repr] def takeRight(n: Int): Repr trait TraversableLike ---------------------------------------------------------------------- def filterNot(p: A => Boolean): Repr def inits: Iterator[Repr] def tails: Iterator[Repr] override def tail: Repr ====================================================================== Checking scala.collection.SeqView ====================================================================== trait IterableLike ---------------------------------------------------------------------- def dropRight(n: Int): Repr def sliding(size: Int): Iterator[Repr] def takeRight(n: Int): Repr trait SeqLike ---------------------------------------------------------------------- def combinations(n: Int): Iterator[Repr] def distinct: Repr def permutations: Iterator[Repr] def sortBy[B](f: A => B)(implicit ord: scala.math.Ordering[B]): Repr def sortWith(lt: (A, A) => Boolean): Repr trait TraversableLike ---------------------------------------------------------------------- def filterNot(p: A => Boolean): Repr def inits: Iterator[Repr] def tails: Iterator[Repr] override def tail: Repr ====================================================================== Checking scala.collection.mutable.IndexedSeqView ====================================================================== trait IndexedSeqOptimized ---------------------------------------------------------------------- override def dropRight(n: Int): Repr override def tail: Repr override def takeRight(n: Int): Repr trait IterableLike ---------------------------------------------------------------------- def sliding(size: Int): Iterator[Repr] trait SeqLike ---------------------------------------------------------------------- def combinations(n: Int): Iterator[Repr] def distinct: Repr def permutations: Iterator[Repr] def sortBy[B](f: A => B)(implicit ord: scala.math.Ordering[B]): Repr def sortWith(lt: (A, A) => Boolean): Repr trait TraversableLike ---------------------------------------------------------------------- def filterNot(p: A => Boolean): Repr def inits: Iterator[Repr] def tails: Iterator[Repr] ====================================================================== Checking scala.collection.immutable.StreamView ====================================================================== trait IterableLike ---------------------------------------------------------------------- def dropRight(n: Int): Repr def sliding(size: Int): Iterator[Repr] def takeRight(n: Int): Repr trait SeqLike ---------------------------------------------------------------------- def combinations(n: Int): Iterator[Repr] def distinct: Repr def permutations: Iterator[Repr] def sortBy[B](f: A => B)(implicit ord: scala.math.Ordering[B]): Repr def sortWith(lt: (A, A) => Boolean): Repr trait TraversableLike ---------------------------------------------------------------------- def filterNot(p: A => Boolean): Repr def inits: Iterator[Repr] def tails: Iterator[Repr] override def tail: Repr
* | | | | | Merge pull request #3161 from retronym/ticket/7984Jason Zaugg2013-11-268-14/+30
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | Issue unchecked warning for type aliases
| * | | | | SI-7984 Issue unchecked warning for type aliasesJason Zaugg2013-11-268-14/+30
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | - Dealias pattern types before launching the CheckabilityChecker - Sharpen the error messages to explain that the dealiased type is the expansion of the alias.
* | | | | Merge pull request #3195 from retronym/ticket/8011Jason Zaugg2013-11-261-0/+8
|\ \ \ \ \ | |_|_|_|/ |/| | | | SI-8011 Test case for recently fixed value class bug
| * | | | SI-8011 Test case for recently fixed value class bugJason Zaugg2013-11-261-0/+8
|/ / / / | | | | | | | | | | | | | | | | The improvements to symbol substitution in cb37548ef made this one work.
* | | | Merge pull request #3147 from som-snytt/issue/repl-columnsAdriaan Moors2013-11-256-14/+212
|\ \ \ \ | | | | | | | | | | SI-7969 REPL -C columnar output
| * | | | SI-7969 REPL variable columnar outputSom Snytt2013-11-183-10/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend column formatting to make columns only as wide as their widest element. This is similar to what `ls` does. Given the longest and shortest string, which bound the min and max column count, compute the layout for those possible column counts, and choose the minimal row count and minimal column count. The junit test is under pending because it uses expecty. (Edit: updated without expectytations.) Example that really benefits, witness the skinny columns: ``` scala> math. BigDecimal PartiallyOrdered cosh rint BigInt Pi exp round E ScalaNumber expm1 signum Equiv ScalaNumericAnyConversions floor sin Fractional ScalaNumericConversions hypot sinh IEEEremainder abs log sqrt Integral acos log10 tan LowPriorityEquiv asin log1p tanh LowPriorityOrderingImplicits atan max toDegrees Numeric atan2 min toRadians Ordered cbrt package ulp Ordering ceil pow PartialOrdering cos random ``` more
| * | | | SI-7969 Refactor to trait with testSom Snytt2013-11-154-20/+73
| | | | | | | | | | | | | | | | | | | | Make REPL classes testable in junit. Test the Tabulator.
| * | | | SI-7969 REPL -C columnar outputSom Snytt2013-11-144-11/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let `ConsoleReaderHelper.printColumns` print in a vertical orientation (similar to `ls -C`) instead of horizontally (`ls -x`). To support the old behavior, add a property `-Dscala.repl.format=across` where "across" is the presumptive mnemonic for `-x`. The format property also takes value `paged` to turn on pagination, which currently forces single-column output (as does `ls | more`) for simplicity.
* | | | | Merge pull request #3178 from retronym/ticket/7872Adriaan Moors2013-11-259-1/+84
|\ \ \ \ \ | | | | | | | | | | | | SI-7872 Plug a variance exploit in refinement types
| * | | | | SI-7872 Plug a variance exploit in refinement typesJason Zaugg2013-11-239-1/+84
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refinement types are collapsed to a TypeTree with an original during type checking; this was enough to evade variance validation in refchecks. This commit: - validates the original of `TypeTree`s in refchecks - changes VarianceValidator to recurse into: - the originals of `TypeTree`s - `TypTree` (to cover, e.g. `CompoundTypeTree` / `SelectFromTypeTree`) It also finds an unreported variance violation in an existing test case, variances.scala. This looks to be legitimate.
* | | | | Merge pull request #3183 from xeno-by/topic/pure-expression-does-nothingAdriaan Moors2013-11-256-7/+17
|\ \ \ \ \ | | | | | | | | | | | | SI-8001 spurious "pure expression does nothing" warning
| * | | | | SI-8001 spurious "pure expression does nothing" warningEugene Burmako2013-11-236-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `isPureExprForWarningPurposes` doesn’t warn on `()`, but `(): Unit` leaves it confused. This patch fixes the problem. The fix is important in the context of the recent split between blackbox and whitebox macros. Macro engines wrap expansions of blackbox macros in type ascriptions, so a macro that expands into `()` would actually produce `(): Unit`, which would trigger a spurious warning. Thanks @milessabin for spotting this problem!
* | | | | | Merge pull request #3130 from retronym/ticket/7967-2Adriaan Moors2013-11-253-2/+21
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-7967 Account for type aliases in self-type checks
| * | | | | | SI-7967 Account for type aliases in self-type checksJason Zaugg2013-11-223-2/+21
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These eluded the check for "illegal inheritance; self-type does not conform" as AliasTypeRef doesn't forward `typeOfThis`. This commit dealiases before calling `typeOfThis`. That seems to be the most localised change. Without the dealias, we had: parent.tpe = TypeRef(pre, sym = AliasTypeSymbol("CC"), Nil) parent.tpe.typeOfThis = parent.tpe.transform(sym.typeOfThis) = CC After: parent.tpe.dealias = TypeRef(pre, sym = ClassSymbol("C"), Nil) parent.tpe.dealias.typeOfThis = C with B