summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* SI-7507 Fix lookup of private[this] member in presence of self type.Jason Zaugg2013-05-314-2/+52
| | | | | | | | | | | | | | | | | | | | | | | | In the following code: trait Cake extends Slice trait Slice { self: Cake => // must have self type that extends `Slice` private[this] val bippy = () // must be private[this] locally(bippy) } `ThisType(<Slice>)`.findMember(bippy)` excluded the private local member on the grounds that the first class in the base type sequence, `Cake`, was not contained in `Slice`. scala> val thisType = typeOf[Slice].typeSymbol.thisType thisType: $r.intp.global.Type = Slice.this.type scala> thisType.baseClasses res6: List[$r.intp.global.Symbol] = List(trait Cake, trait Slice, class Object, class Any) This commit changes `findMember` to use the symbol of the `ThisType`, rather than the first base class, as the location of the selection.
* Merge pull request #2578 from retronym/ticket/6138Adriaan Moors2013-05-297-9/+39
|\ | | | | SI-6138 Centralize and refine detection of `getClass` calls
| * SI-6138 Centralize and refine detection of `getClass` callsJason Zaugg2013-05-237-9/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `getClass` is special cased in the compiler; this is described in in the comments on `Definitions.Any_getClass`. Part of this happens in `Typer#stabilize`. This was trying to determine if an Ident or Select node was a call to `getClass` by merits of the name of the tree's symbol and by checking that the its type (if it was a MethodType or PolyType) had no parameters in the primary parameter list. Overloaded user defined `getClass` methods confused this check. In the enclosed test case, the tree `definitions.this.getClass` had an `OverloadedType`, and such types always report an empty list of `params`. This commit: - changes `stabilize` to use `isGetClass`, rather than the homebrew check - changes `isGetClass` to consider a `Set[Symbol]` containing all `getClass` variants. This moves some similar code from `Erasure` to `Definitions` - keeps a fast negative path in `isGetClass` based on the symbol's name
* | Merge pull request #2570 from soc/SI-7391James Iry2013-05-281-4/+1
|\ \ | | | | | | SI-7391 Always use ForkJoin in Scala actors on ...
| * | SI-7391 Always use ForkJoin in Scala actors on ...Simon Ochsenreither2013-05-201-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... Java 6 and above (except when the porperty actors.enableForkJoin says otherwise) Like SI-7236 and SI-7237, the logic in scala.actors.scheduler.ThreadPoolConfig.useForkJoin (which resulted in a different thread pool implementation being chosen) was causing random hangs in the test concurrent-stream.scala when running on Avian.
* | | Merge pull request #2583 from som-snytt/issue/7473-pointless-for-crashPaul Phillips2013-05-274-5/+24
|\ \ \ | | | | | | | | SI-7473 Bad for expr crashes postfix
| * | | SI-7473 Bad for expr crashes postfixSom Snytt2013-05-234-5/+24
| | |/ | |/| | | | | | | | | | | | | This commit makes building PostfixSelect robust against a bad pos on its operand, which can happen if a bad for expression results in an EmptyTree.
* | | Merge pull request #2600 from retronym/topic/lub-dealias-widenJason Zaugg2013-05-271-0/+34
|\ \ \ | | | | | | | | A test case for a recent LUB progression.
| * | | A test case for a recent LUB progression.Jason Zaugg2013-05-271-0/+34
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A test distilled from a Lift example that compiles correctly under 2.10.1, but not under 2.10.0. I pinpointed the progression to: https://github.com/scala/scala/commit/a06d31f6#L0R6611 Chalk up another win for `dealiasWiden`.
* | | Merge pull request #2595 from adriaanm/backport-pr-2450Paul Phillips2013-05-261-5/+1
|\ \ \ | | | | | | | | SI-7421 remove unneeded extra-attachement in maven deploy
| * | | SI-7421 remove unneeded extra-attachement in maven deployFrançois Garillot2013-05-241-5/+1
|/ / /
* | | Merge pull request #2559 from soc/SI-7497Adriaan Moors2013-05-231-7/+9
|\ \ \ | |/ / |/| | SI-7497 Fix scala.util.Properties.isMac
| * | SI-7497 Fix scala.util.Properties.isMacSimon Ochsenreither2013-05-231-7/+9
|/ / | | | | | | | | | | | | | | It returned wrong values because it used the java.vendor property instead of os.name. See http://mail.openjdk.java.net/pipermail/macosx-port-dev/2012-November/005148.html for the reason why we don't follow developer.apple.com/library/mac/#technotes/tn2002/tn2110.
* | Merge pull request #2572 from JamesIry/2.10.3_build_numberAdriaan Moors2013-05-201-1/+1
|\ \ | | | | | | Increase build.number to 2.10.3
| * | Increase build.number to 2.10.3James Iry2013-05-201-1/+1
|/ / | | | | | | Gets this branch ready for the next release in the 2.10.x series.
* | Merge pull request #2506 from scalamacros/ticket/7461Eugene Burmako2013-05-205-2/+18
|\ \ | | | | | | c.typeCheck(silent = true) now suppresses ambiguous errors
| * | c.typeCheck(silent = true) now suppresses ambiguous errorsEugene Burmako2013-05-095-2/+18
| | | | | | | | | | | | | | | | | | Otherwise use cases like the one shown in the attached test (trying to typecheck something, which leads to an ambiguous overload error) will mysteriously fail compilation.
* | | Merge pull request #2508 from ↵Adriaan Moors2013-05-202-43/+46
|\ \ \ | |_|/ |/| | | | | | | | viktorklang/wip-removing-synchronization-from-DefaultPromise-2.10-√ Reimplementing blocking awaiting for Futures so only the blockers have t...
| * | Reimplementing much of the DefaultPromise methodsViktor Klang2013-05-182-43/+46
| | | | | | | | | | | | | | | | | | | | | | | | Optimizations: 1) Avoiding to call 'synchronized' in tryComplete and in tryAwait 2) Implementing blocking by using an optimized latch so no blocking ops for non-blockers 3) Reducing method size of isCompleted to be cheaper to inline 4) 'result' to use Try.get instead of patmat
* | | Merge pull request #2540 from adriaanm/ticket-7201v2.10.2-RC1Adriaan Moors2013-05-174-1/+12
|\ \ \ | | | | | | | | SI-7201 scala-library's pom points to scaladoc url
| * | | SI-7201 scaladoc url in scala-(library,actors,swing,reflect) pomAdriaan Moors2013-05-174-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The project/properties/info.apiURL pom property is used by SBT to link to an artifact's scaladoc. For scala library version $v, the url is http://www.scala-lang.org/api/$v/ Note that actors, reflect and swing are included in the library docs in 2.10.x.
* | | | Merge pull request #2530 from kzys/jira-6424Adriaan Moors2013-05-171-9/+25
|\ \ \ \ | | | | | | | | | | SI-6424 Scaladoc: Use mapNodes.get(_) to avoid NoSuchElementException
| * | | | SI-6424 Scaladoc: Use mapNodes.get(_) to avoid NoSuchElementExceptionKato Kazuyoshi2013-05-151-9/+25
| | | | | | | | | | | | | | | | | | | | Use mapNodes.get(_) instead of mapNodes(_) to avoid NoSuchElementException.
* | | | | Merge pull request #2549 from vigdorchik/slash_slashAdriaan Moors2013-05-171-4/+1
|\ \ \ \ \ | | | | | | | | | | | | Prevent slash duplication.
| * | | | | Prevent slash duplication.Eugene Vigdorchik2013-05-171-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't add trailing slash to external doc URL if it already ends with one.
* | | | | | Merge pull request #2536 from adriaanm/ticket-7359Adriaan Moors2013-05-176-81/+32
|\ \ \ \ \ \ | | | | | | | | | | | | | | [backport #1727] SI-7359 cyclic nested java class
| * | | | | | [backport #1727] SI-7359 cyclic nested java classAdriaan Moors2013-05-166-81/+32
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original commit message (from 54a84a36d5): SI-6548 reflection correctly enters jinners When completing Java classes, runtime reflection enumerates their fields, methods, constructors and inner classes, loads them and enters them into either the instance part (ClassSymbol) or the static part (ModuleSymbol). However unlike fields, methods and constructors, inner classes don't need to be entered explicitly - they are entered implicitly when being loaded. This patch fixes the double-enter problem, make sure that enter-on-load uses the correct owner, and also hardens jclassAsScala against double enters that can occur in a different scenario.
* | | | | | Merge pull request #2553 from paulp/issue/7486Adriaan Moors2013-05-172-3/+15
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | SI-7486 regression in implicit resolution.
| * | | | | SI-7486 regression in implicit resolution.Paul Phillips2013-05-172-3/+15
|/ / / / / | | | | | | | | | | | | | | | What a touchy beast the compiler is.
* | | | | Merge pull request #2550 from scalamacros/2.10.xJason Zaugg2013-05-171-0/+3
|\ \ \ \ \ | |_|_|/ / |/| | | | [nomaster] unbreaks test.bc
| * | | | [nomaster] unbreaks test.bcEugene Burmako2013-05-171-0/+3
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The optimizer behaves unexpectedly smartly, stripping off unused private methods. Unfortunately, sometimes private methods might be compiled down to public Java methods, so stripping them off might lead to binary incompatibilities. This particular commit recovers from this problem caused by https://github.com/scala/scala/commit/5e715396af.
* | | | Merge pull request #2504 from scalamacros/ticket/7464Jason Zaugg2013-05-174-14/+8
|\ \ \ \ | | | | | | | | | | SI-7464 allows FieldMirror.set to update vals
| * | | | SI-7464 allows FieldMirror.set to update valsEugene Burmako2013-05-174-14/+8
| | | | | | | | | | | | | | | | | | | | | | | | | There's no reason to leave such sentinels in place inside a facility designed to circumvent usual restrictions of static types / visibility.
* | | | | Merge pull request #2497 from scalamacros/topic/macro-qqqJason Zaugg2013-05-177-21/+66
|\ \ \ \ \ | | | | | | | | | | | | easy way of writing not implemented macros
| * | | | | easy way of writing not implemented macrosEugene Burmako2013-05-127-21/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even though it's easy to mark regular method bodies as stubs (using ???), there's no simple way of doing the same for macro methods. This patch fixes the inconvenience.
* | | | | | Merge pull request #2547 from paulp/issue/bogus-warningJason Zaugg2013-05-161-2/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix for unreachable code warning.
| * | | | | | Fix for unreachable code warning.Paul Phillips2013-05-161-2/+1
|/ / / / / / | | | | | | | | | | | | | | | | | | Oops, I miss when unreachable code was an error.
* | | | | | Merge pull request #2537 from adriaanm/ticket-5886Paul Phillips2013-05-162-22/+19
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-5886 Remove check for packed type conformance.
| * | | | | | SI-5886 Remove check for packed type conformance.Jason Zaugg2013-05-152-22/+19
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nothing breaks. Why did by-name arguments have this extra check? What's the difference to a () => T? The check was added originally in 8414eba.
* | | | | | Merge pull request #2515 from heathermiller/issue/6555Adriaan Moors2013-05-151-7/+10
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Actual SI-6555 fix, Scaladoc filter works now WITH keyboard shortcuts too
| * | | | | Actual SI-6555 fix, Scaladoc filter works WITH keyboard shortcuts tooHeather Miller2013-05-121-7/+10
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit daefab18b8b0c170c372991022357413ec69b2af attempted to fix a bug related to Scaladoc filtering, meanwhile breaking Scaladoc keyboard shortcuts. Before commit daefab18b8b0c170c372991022357413ec69b2af, Scaladoc's filter wouldn't consider the last character of a search term entered into the (left) Scaladoc filter pane, but toggling with the `tab` key between filter panes did work. After daefab18b8b0c170c372991022357413ec69b2af, Scaladoc's left pane filter correctly searches for the full search term, but pressing the `tab` key causes the "focus" of the input bar to be stuck on the filter panel in the right Scaladoc filter pane, rendering it useless. End result: annoying Scaladoc interface bug present in 2.10.1, but which wasn't present in 2.10.0. This pull request fixes this, enabling both behaviors. The `tab` key toggle needed to be triggered on a `keydown` event (currently it's not), while everything else is fine to be triggered on a `keyup` event. This pull request enables the correct behavior by binding both a `keydown` and a `keyup` event rather than lumping everything all together in a `keyup` event (as was the case before).
* | | | | Merge pull request #2502 from ↵Adriaan Moors2013-05-142-1/+20
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | viktorklang/wip-SI7383-EC-prepare-in-Future-apply-2.10-√ SI-7383 - call ExecutionContext.prepare in Future.apply
| * | | | SI-7383 - Call ExecutionContext.prepare in Future.apply to allow for ↵Viktor Klang2013-05-102-1/+20
| | |_|/ | |/| | | | | | | | | | capturing local context like ThreadLocals and then re-establishing them prior to execution, as per intention of EC.prepare
* | | | Merge pull request #2500 from phaller/topic/forkjoin-updateJason Zaugg2013-05-126-1085/+1964
|\ \ \ \ | |_|/ / |/| | | SI-7442 Update bundled Fork/Join pool (JSR166y)
| * | | SI-7442 Update bundled Fork/Join pool (JSR166y)Philipp Haller2013-05-116-1085/+1964
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Updates ForkJoinPool and dependent classes to the latest jsr166y revisions: ForkJoinPool.java: Revision 1.185 Sat Feb 16 20:50:29 2013 UTC (2 months, 2 weeks ago) by jsr166 ForkJoinTask.java: Revision 1.100 Tue Feb 5 17:09:54 2013 UTC (3 months ago) by jsr166 ForkJoinWorkerThread.java: Revision 1.73 Wed Nov 21 19:54:39 2012 UTC (5 months, 2 weeks ago) by dl - Includes Akka-contributed `sun.misc.Unsafe` detection to support Android. See changeset 06d685c1bbd8a0d058ee8a3f374569f8097f2acc - Adds private `CountedCompleter` class. This class is only visible and used in `ForkJoinPool.java`. - Updates desired.sha1 for updated forkjoin.jar. - Updates binary compatibility whitelists to exclude package-private methods in the `forkjoin` package. - Also fixes SI-7438.
* | | | Merge pull request #2494 from scalamacros/ticket/5923Eugene Burmako2013-05-1155-72/+466
|\ \ \ \ | | | | | | | | | | makes sense of implicit macros!
| * | | | [nomaster] removes duplication in inferImplicitValueEugene Burmako2013-05-113-50/+28
| | | | | | | | | | | | | | | | | | | | Shame-driven development at its best.
| * | | | [nomaster] SI-7166 catches DivergentImplicit in c.inferImplicitXXXEugene Burmako2013-05-115-20/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Despite inferImplicit usually being nice and buffering errors, apparently it can also throw DivergentImplicit exception. This patch catches it and only reports it if silent is set to false. NOTE: we no longer have the DivergentImplicit exception in master, so this commit only makes sense in 2.10.x.
| * | | | [nomaster] SI-7047 fixes silent for c.inferImplicitXXXEugene Burmako2013-05-115-2/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | silent = true now throws a TypecheckException even if we don't know why an implicit search has failed (i.e. if context.hasErrors is false). NOTE: this commit is a part of a pull request for 2.10.x, which makes sense of implicit macros. Everything in that pull request is [nomaster] due to one reason or another. This commit would work equally well in both 2.10.x and master, but I'm marking it as [nomaster] as well, because I'm anyway going to resubmit the whole pull request into master soon, so there's no reason to introduce additional confusion.
| * | | | [nomaster] SI-7291: No exception throwing for diverging implicit expansionHubert Plociniczak2013-05-1117-14/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we don't throw exceptions for normal errors it was a bit odd that we don't do that for DivergingImplicit. As SI-7291 shows, the logic behind catching/throwing exception was broken for divergence. Instead of patching it, I rewrote the mechanism so that we now another SearchFailure type related to diverging expansion, similar to ambiguous implicit scenario. The logic to prevent diverging expansion from stopping the search had to be slightly adapted but works as usual. The upside is that we don't have to catch diverging implicit for example in the presentation compiler which was again showing that something was utterly broken with the exception approach. NOTE: This is a partial backport of https://github.com/scala/scala/pull/2428, with a fix for SI-7291, but without removal of error kinds (the former is absolutely necessary, while the latter is nice to have, but not a must, therefore I'm not risking porting it to 2.10.x). Also, the fix for SI-7291 is hidden behind a flag named -Xdivergence211 in order not to occasionally break the code, which relies on pre-fix behavior.