scala/scala — pull request #1764 by adriaanm (2012-12-12 23:53:30+00:00)
Title: SIP-14 backport to 2.9.x

Other than adding the new APIs, a few changes are required:

1. Build. The Java sources in "scala/concurrent/impl" need forkjoin.jar on the classpath. Thus, I replaced the "classpath" attribute in the respective `javac` ant tasks (locker.lib and quick.lib) with a "classpathref" attribute pointing to a classpath which includes also the forkjoin.jar. In the locker.lib target, exclude the duration package and everything that depends on it.

Also, the library is built with -Ydependent-method-types (for both quick & strap -- use consistent options for stability)

2. Dependent method types and SI-5958. The `duration` package relies on dependent method types, and requires a backport of SI-5958 (original backport was in #1726).

3. To avoid a backend bug involving `throw` expressions inside closures (exercised by the Try tests), a backport of the fix for SI-6188 is required (original backport was in #1755).

Review by @jsuereth (build)

(resubmission of https://github.com/scala/scala/pull/1745)