summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #3843 from Blaisorblade/topic/fix-minus-infAdriaan Moors2014-07-031-1/+1
|\ | | | | SI-8677 Duration: Zero - Inf should be MinusInf
| * SI-8677 Duration: Zero - Inf should be MinusInfPaolo G. Giarrusso2014-06-281-1/+1
| | | | | | | | Fixes #8677. Add basic tests.
* | Merge pull request #3853 from evvers/change-stringcontext-scaladocVlad Ureche2014-07-021-1/+1
|\ \ | | | | | | Change StringContext scaladoc
| * | Change StringContext scaladocEvgeny Vereshchagin2014-06-211-1/+1
| | | | | | | | | | | | | | | | | | | | | See e2a3498 commit message for explanation Explicit private declaration better than implicit Thanks to @som-snytt
* | | Added example to Option.collect method.jxcoder2014-07-021-0/+11
|/ /
* | Merge remote-tracking branch 'origin/2.11.x' into merge/2.11.x-2.12.x-20140627Jason Zaugg2014-06-2711-48/+128
|\ \ | |/ |/|
| * Merge pull request #3778 from xeno-by/topic/plugins-is-blackboxJason Zaugg2014-06-272-1/+24
| |\ | | | | | | adds MacroPlugin.pluginsIsBlackbox
| | * adds MacroPlugin.pluginsIsBlackboxEugene Burmako2014-05-222-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-271-2/+3
| |\ \ | | | | | | | | macro args now correctly preserve range positions
| | * | macro args now correctly preserve range positionsEugene Burmako2014-05-231-2/+3
| | |/ | | | | | | | | | | | | | | | | | | | | | 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-271-2/+5
| |\ \ \ | | | | | | | | | | SI-8657 don't miss tailrec defs in more positions
| | * | | SI-8657 don't miss tailrec defs in more positionsJohannes Rudolph2014-06-251-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-271-2/+4
| |\ \ \ \ | | | | | | | | | | | | SI-8185 Correct grammar for single-warning compilation run
| | * | | | SI-8185 Correct grammar for single-warning compilation runFrançois Garillot2014-05-141-2/+4
| | | | | |
| * | | | | Merge pull request #3758 from gourlaysama/wip/t7372Ichoran2014-06-261-6/+6
| |\ \ \ \ \ | | |_|_|/ / | |/| | | | 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-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-251-19/+29
| |\ \ \ \ \ | | | | | | | | | | | | | | SI-6967 Fix ClassTag unapply for primitives
| | * | | | | SI-6967 Fix ClassTag unapply for primitivesclhodapp2014-06-101-19/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | SI-8672 Better end-of-sentence detection for ScaladocJason Zaugg2014-06-201-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-111-4/+14
| |\ \ \ \ \ | | | | | | | | | | | | | | 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-101-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | | SI-8611 Avoid accidental patmat unification with refinement typesJason Zaugg2014-06-101-9/+16
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 remote-tracking branch 'origin/2.11.x' into merge/2.11.x-to-2.12.xJason Zaugg2014-06-1023-144/+193
|\| | | | |
| * | | | | Merge pull request #3812 from retronym/merge/2.10.x-to-2.11.x-20140604Adriaan Moors2014-06-101-2/+2
| |\ \ \ \ \ | | | | | | | | | | | | | | Merge 2.10.x to 2.11.x
| | * \ \ \ \ Merge remote-tracking branch 'origin/2.10.x' into ↵Jason Zaugg2014-06-041-2/+2
| | |\ \ \ \ \ | | | |_|/ / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | merge/2.10.x-to-2.11.x-20140604 Conflicts: src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala
| | | * | | | SI-8596 Fix rangepos crasher with defaults, poly methodsJason Zaugg2014-05-291-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | | Merge pull request #3800 from som-snytt/issue/8503Adriaan Moors2014-06-107-100/+103
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-8503 -version is info setting
| | * | | | | | SI-8503 -version is info settingSom Snytt2014-05-297-88/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And the Scala runner exits with 0 for info settings. Producing the version string is consolidated. The compiler driver uses the default settings hook to short-circuit on -version. That's to avoid creating the compiler; really it should check shouldStopWithInfo first, as the runner does.
| | * | | | | | SI-8503 Clean up interpolation of help messageSom Snytt2014-05-281-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have interpolation now. This commit also moves an extra blank line from the end to the middle of the message.
| * | | | | | | Merge pull request #3787 from tvierling/concurrent-doc-nitsAdriaan Moors2014-06-054-9/+33
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Add documentation to parts of scala.concurrent.
| | * | | | | | | Add documentation to parts of scala.concurrent.Todd Vierling2014-06-034-9/+33
| | | |/ / / / / | | |/| | | | |
| * | | | | | | Don't crash on dead code in ICodeReaderLukas Rytz2014-06-041-20/+28
| | | | | | | |
| * | | | | | | Merge pull request #3811 from lrytz/bcode/arrayCloneLukas Rytz2014-06-042-2/+8
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Fix emitting Array(1).clone() in GenBCode
| | * | | | | | | Fix emitting Array(1).clone() in GenBCodeLukas Rytz2014-06-042-2/+8
| | |/ / / / / /
| * | | | | | | Merge pull request #3743 from ruippeixotog/issue/8553Ichoran2014-06-041-1/+1
| |\ \ \ \ \ \ \ | | |/ / / / / / | |/| | | | | | SI-8553 WrappedArray throws exception on lastIndexWhere when index out of range
| | * | | | | | SI-8553 WrappedArray throws exception on lastIndexWhere when index out of rangeRui Gonçalves2014-05-121-1/+1
| | | |_|_|_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a check in `IndexedSeqOptimized#lastIndexWhere(A => Boolean, Int)` to begin searching in the end of the collection if `end` is greater than the collection's length. Discussed in https://groups.google.com/d/topic/scala-internals/-MacXivbY0Q/discussion.
| * | | | | | Merge pull request #3803 from xeno-by/ticket/8637Adriaan Moors2014-06-031-0/+1
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-8637 fixes toolbox phase corruption
| | * | | | | | SI-8637 fixes toolbox phase corruptionEugene Burmako2014-05-301-0/+1
| | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It turns out, Toolbox.typecheck hasn't been properly re-initializing its state between requests. In particular, globalPhase was left untouched, which made the compiler think that it's past typer, and that in turn disabled implicits. This commit applies a symptomatic fix to this problem.
| * | | | | | Merge pull request #3796 from som-snytt/issue/8630Adriaan Moors2014-06-031-1/+1
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-8630 lineToString no longer long by one at eof
| | * | | | | | SI-8630 lineToString no longer long by one at eofSom Snytt2014-05-271-1/+1
| | | |/ / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One more EOL crasher, or lack-of-EOL crasher, when the text is at EOF. It was not caught by the last round of excellent and thorough tests because ``` // If non-whitespace tokens run all the way up to EOF, // positions go wrong because the correct end of the last // token cannot be used as an index into the char array. // The least painful way to address this was to add a // newline to the array. ```
| * | | | | | Merge pull request #3795 from som-snytt/issue/8475Adriaan Moors2014-06-031-6/+7
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-8475 GroupedIterator is also lazy when padded
| | * | | | | | SI-8475 GroupedIterator is also lazy when paddedSom Snytt2014-05-271-6/+7
| | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the related case which dnlgtm in the previous fix. The old code seems to be tilting for laziness, but we have to fill the buffer with the current group anyway, so there is no reason to be coy about calling ArrayBuffer.length.
| * | | | | | Merge pull request #3789 from clhodapp/fix/SI-6678Adriaan Moors2014-06-031-1/+2
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | SI-6678 Make currentMirror macro hygenic