summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | SI-7577 Incorrect documentation: current default isn't VectorRex Kerr2014-06-264-3/+4
| | | | | | | | | | | | | | | | | | | | Fixed documentation to specify List in four cases where it was wrong or missing.
* | | | | Merge pull request #3736 from VladimirNik/print-types-issue-2.11.xAdriaan Moors2014-07-032-40/+78
|\ \ \ \ \ | | | | | | | | | | | | SI-8447 fix TypeTree printing (2.11.x)
| * | | | | TypeTree printing modified (SI-8447)VladimirNik2014-05-092-40/+78
| | | | | |
* | | | | | Merge pull request #3772 from densh/si/8609Adriaan Moors2014-07-032-0/+14
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-8609 Fix flattening of definitions and imports in quasiquotes
| * | | | | | SI-8609 Fix flattening of definitions and imports in quasiquotesDenys Shabalin2014-05-212-0/+14
| | |_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Quasiquotes allow to unquote trees with ..$ with block flattening semantics to simplify composition: val onetwo = q"1; 2" val onetwothree = q"..$onetwo; 3" // same as q"1; 2; 3" If there is no block it will be equivalent to $ unquoting: val one = q"1" val onetwo = q"..$one; 2" // same as q"1; 2" But the inconsistency here is that currently only terms support this single-element semantics. This commit extends this functionality to also support definitions and imports. So that following code works: val q1 = q"val x = 1" val q2 = q"..$q1; val y = 2" // same as q"val x = 1; val y = 2"
* | | | | | Merge pull request #3863 from adriaanm/rebase-3852Adriaan Moors2014-07-031-10/+36
|\ \ \ \ \ \ | | | | | | | | | | | | | | Document SuperAccessors
| * | | | | | Document SuperAccessorsMartin Odersky2014-07-031-10/+36
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | Added comment giving an up-to-date overview of SuperAccessors and how we might want to change it.
* | | | | | Merge pull request #3828 from retronym/ticket/8675Adriaan Moors2014-07-035-1/+64
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | SI-8675 Avoid unreported error after second try using implicit view
| * | | | | SI-8675 Add another test case for swallowed type errorsJason Zaugg2014-06-262-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As reported on scala-internals. After tightening up the treatment of undetermined type parameters in SI-7944, the enclosed test case no longer typechecks. And since the regression fixed in the previous commit, the error was swallowed by the typechecker only to be burped up by a crash in the backend.
| * | | | | SI-8675 Avoid unreported error after second try using implicit viewJason Zaugg2014-06-253-1/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is specific to situations in which we first typecheck an application `qual.m(arg)` against the method `m` directly provided by `qual`, and then fall back to `implicitView(qual).m(arg)`. Regressed in SI-3971 / 7fa77af, in which error reports were moved to the innermost `Apply`, and the check for `errorInResult` was accordingly changed to recurse through `Apply` trees. Before that change, we did not fall back to using a view. After the change, we do try a view. We retypecheck the arguments under the `retyping` mode (see `tryTypedArgs`), but this doesn't seem to be enough to avoid leaking the error typed nested trees from the first try. Here's an example from the enclosed test case: a.update(0, x[A]({new isString(true)})) `-- error typed refArrayOps(a).update(0, x[A]({new isString(true)})) ` `-- error type persists `-- this tree is retypecked by tryTypedArgs This commit changes `onError` to only proceed with the second try if the retyped argument trees are error free.
* | | | | | Merge pull request #3836 from gourlaysama/wip/t8292Grzegorz Kossakowski2014-07-011-3/+3
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-8292 report error when scaladoc fails to find doclet.
| * | | | | | SI-8292 report error when scaladoc fails to find doclet.Antoine Gourlay2014-07-011-3/+3
| | |_|_|_|/ | |/| | | |
* | | | | | Merge pull request #3849 from gourlaysama/wip/t8690Ichoran2014-06-293-1/+15
|\ \ \ \ \ \ | |/ / / / / |/| | | | | SI-8690 BufferedSource.mkString mistakenly skipped the first char.
| * | | | | SI-8690 BufferedSource.mkString mistakenly skipped the first char.Antoine Gourlay2014-06-293-1/+15
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mkString is overriden in BufferedSource for performance, but the implementation always used the wrong reader. This seems to be a typo (`allReader` is declared 5 lines earlier but never used, `charReader` is used in its place).
* | | | | Merge pull request #3778 from xeno-by/topic/plugins-is-blackboxJason Zaugg2014-06-277-1/+64
|\ \ \ \ \ | | | | | | | | | | | | adds MacroPlugin.pluginsIsBlackbox
| * | | | | adds MacroPlugin.pluginsIsBlackboxEugene Burmako2014-05-227-1/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an important omission in the current macro plugin API, which was designed before the blackbox vs whitebox separation was implemented. Even if one overrides pluginsTypedMacroBody and pluginsMacroExpand, that would still be not enough to write a custom macro expander, because typedImplicit1 uses isBlackbox, which is tightly coupled with the standard way of reading/writing macro signatures.
* | | | | | Merge pull request #3780 from xeno-by/topic/rangepos-macro-argsJason Zaugg2014-06-275-2/+19
|\ \ \ \ \ \ | | | | | | | | | | | | | | macro args now correctly preserve range positions
| * | | | | | macro args now correctly preserve range positionsEugene Burmako2014-05-235-2/+19
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Somewhen in the 2.11.0 development cycle we started duplicating macro arguments for increased robustness. What wasn't taken into account though is that Tree.duplicate destroys range positions. This commit fixes the problem. 2.10.x is unaffected by this bug, because it doesn't duplicate the args yet.
* | | | | | Merge pull request #3835 from Ichoran/issue/7562Jason Zaugg2014-06-271-2/+8
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-7562 Regex.findAllIn does not report all matches
| * | | | | | SI-7562 Regex.findAllIn does not report all matchesRex Kerr2014-06-261-2/+8
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | Changed findAllIn docs to clarify that it finds non-overlapping matches.
* | | | | | Merge pull request #3832 from jrudolph/w/fix-tailrecJason Zaugg2014-06-275-4/+97
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-8657 don't miss tailrec defs in more positions
| * | | | | | SI-8657 don't miss tailrec defs in more positionsJohannes Rudolph2014-06-255-4/+97
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) First operand of boolean expression using `&&` or `||`. Second operands of those boolean exprs were already treated specially here but handling for first operands was missing. 2) Condition of `If`. Also added a test for guards.
* | | | | | Merge pull request #3749 from huitseeker/issue/DeprecWarningJason Zaugg2014-06-2762-73/+75
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-8185 Correct grammar for single-warning compilation run
| * | | | | | SI-8185 Correct grammar for single-warning compilation runFrançois Garillot2014-05-1462-73/+75
| | | | | | |
* | | | | | | Merge pull request #3758 from gourlaysama/wip/t7372Ichoran2014-06-262-8/+8
|\ \ \ \ \ \ \ | |_|_|/ / / / |/| | | | | | SI-7372 fix wrong insertion point for binary & linear search.
| * | | | | | SI-7372 make binarySearch methods use the same parameters for the same things.Antoine Gourlay2014-06-121-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The public facing binarySearch method used an inclusive 'from' parameter, while the internal @tailrec one used an *exclusive* 'from' parameter. No wonder there was an off-by-one error somewhere. This makes both methods use the same exclusive 'from' parameter.
| * | | | | | SI-7372 fix wrong insertion point for binary & linear search.Antoine Gourlay2014-06-042-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It should return the position the value would have if it was a part of the sequence. Somehow even the test was wrong.
* | | | | | | Merge pull request #3806 from clhodapp/fix/SI-6967Adriaan Moors2014-06-254-50/+96
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-6967 Fix ClassTag unapply for primitives
| * | | | | | | SI-6967 Fix ClassTag unapply for primitivesclhodapp2014-06-104-50/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes the behavior of ClassTag's Any-accepting unapply overload. Previously, ClassTag had overloads of unapply that accepted all of the Java primitive aliases (language-supported magic classes extending AnyVal), as well as an implementation that accepted an Any. All of the AnyVal-accepting (more specific) versions of the methods worked correctly. However, the Any-accepting version incorrectly handled these types. For example, ClassTag.Int.unapply(3) would return Some(3) (through the Int-accepting overload), while ClassTag.Int.unapply(3: Any) would return None (through the Any-accepting overload). This commit unifies these behaviors, making ClassTag.Int.unapply(3: Any) return Some(3). It accomplishes this by adding a pattern match on the type of that method's argument, which will delegate to one of the more-specifically-typed overloads if possible. It also improves the formatting of the code a bit. One thing to note (though I doubt anyone will ever do this based on this message) is that the AnyVal-subtype-accepting overloads should be removed in Scala 2.12, as they are unneeded. I placed a note to this effect into the code.
* | | | | | | | Merge pull request #3805 from Ichoran/issue/6409Adriaan Moors2014-06-251-0/+8
|\ \ \ \ \ \ \ \ | |_|_|_|/ / / / |/| | | | | | | SI-6409 Stream flatMap leaks memory if mapper returns many empties
| * | | | | | | SI-6409 Stream flatMap leaks memory if mapper returns many emptiesRex Kerr2014-05-301-0/+8
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | Added Scaladoc explaining that this is necessary behavior, but closed ticket as wontfix.
* | | | | | | Merge pull request #3824 from retronym/ticket/8672Adriaan Moors2014-06-233-1/+47
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-8672 Better end-of-sentence detection for Scaladoc
| * | | | | | | SI-8672 Better end-of-sentence detection for ScaladocJason Zaugg2014-06-203-1/+47
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first sentence of a Scaladoc comment is parsed as the summary. However, this was breaking of the sentence at the first `.`, even if that was immediately followed by another character. This commit only considers a period followed by whitespace, EOL or EOF as the end of a sentence.
* | | | | | | Merge pull request #3797 from retronym/topic/exhaust-compoundJason Zaugg2014-06-114-4/+59
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-8631 Treat `A with Sealed` as enumerable for pattern matching
| * | | | | | | Remove now-redundant condition in sealedness checkingJason Zaugg2014-06-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It arrived in c1f8dbc, but is no longer needed after user-defined value classes were introduced in 2.10.0.
| * | | | | | | Refactor `enumerateSubtypes`Jason Zaugg2014-06-101-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - reorder to make "unenumerable" the last case - reunite an orphaned comment with its loved ones.
| * | | | | | | SI-8631 Treat `A with Sealed` as enumerable for pattern matchingJason Zaugg2014-06-104-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enumerate the subtypes of sealed parent types of refinement types, and filter those that conform to the refinement type. Such types can crop up easily when LUB-bing case classes which add `Product with Serializable` to the mix.
* | | | | | | | Merge pull request #3781 from retronym/topic/8611Jason Zaugg2014-06-118-9/+145
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | SI-8611 Avoid accidental patmat unification with refinement types
| * | | | | | | | SI-8611 Avoid accidental patmat unification with refinement typesJason Zaugg2014-06-108-9/+145
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the enclosed test, t8611a.scala, the patterns `O.{A, B}` were incorrect treated as equivelent by the combination of `uniqueTpForTree` and `Const.uniqueTpForTree`. `uniqueTpForTree` used `Type#narrow` to try to create a distinct type for each new pattern tree it encountered. However, narrowing a `RefinedType` does not create a distinct type as we are used to when narrowing, e.g. a class type. // Type def narrow: Type = if (phase.erasedTypes) this else { val cowner = commonOwner(this) refinedType(this :: Nil, cowner, EmptyScope, cowner.pos).narrow } // CompoundType override def narrow: Type = typeSymbol.thisType This commit creates a fresh existential type symbol rather than trying to use `narrow`. I've included a unit test to show the sublteties of narrowing refinment types.
* | | | | | | | Merge pull request #3777 from som-snytt/issue/5905-testJason Zaugg2014-06-101-3/+5
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | SI-5905 Clarify test case
| * | | | | | | SI-5905 Clarify test caseSom Snytt2014-05-221-3/+5
| | |_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The language feature options are discovered reflectively, but it is nice to enforce that expected options are supplied. Short of that, the code string includes a rowdy postfix operator. It still does enforce that at least one option was discovered.
* | | | | | | Merge pull request #3815 from retronym/topic/java8-support-2Adriaan Moors2014-06-104-104/+31
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Java 8 agnostism for our test suite
| * | | | | | | Support Java 8 in the checkfile for neg/t6289Jason Zaugg2014-06-041-1/+1
| | | | | | | |
| * | | | | | | Java 6-8 agnosticism for a testJason Zaugg2014-06-043-103/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under Java 8, the output contains newly added methods in j.u.Iterator. I've created cut down, test-local versions of the relevant types to decouple.
* | | | | | | | Merge pull request #3818 from som-snytt/issue/repl-javap-app8Adriaan Moors2014-06-101-1/+24
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Java 8 support for run/repl-javap-app.check
| * | | | | | | | Java 8 support for run/repl-javap-app.checkSom Snytt2014-06-051-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just adding the java 8 output. No attempt to finesse anything. But the partest mechanism does still need auto-update of these conditional check files, plus expression evaluation of the condition.
* | | | | | | | | Merge pull request #3812 from retronym/merge/2.10.x-to-2.11.x-20140604Adriaan Moors2014-06-105-3/+33
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Merge 2.10.x to 2.11.x
| * \ \ \ \ \ \ \ \ Merge remote-tracking branch 'origin/2.10.x' into ↵Jason Zaugg2014-06-045-3/+33
| |\ \ \ \ \ \ \ \ \ | | |_|_|_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | merge/2.10.x-to-2.11.x-20140604 Conflicts: src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala
| | * | | | | | | | Merge pull request #3799 from retronym/topic/8596-2.10Jason Zaugg2014-06-025-4/+34
| | |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | SI-8596 Fix rangepos crasher with defaults, poly methods
| | | * | | | | | | | SI-8596 Fix rangepos crasher with defaults, poly methodsJason Zaugg2014-05-295-4/+34
| | |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Regressed in SI-7915 / 3009a525b5 We should be deriving the position of the synthetic `Select` from `basefun1`, rather than `basefun`. In the new, enclosed test, the difference amounts to: new Container().typeParamAndDefaultArg[Any]() `------------ basefun1 --------------' `----------------- basefun ---------------' For monomorphic methods, these are one and the same, which is why `presentation/t7915` was working. I've extended that test to a polymorphic method to check that hyperlink resolution works.