Skip to content

Commit 7a55f7b

Browse files
committed
Brute force patches to make separation checker happy
1 parent 94dd70b commit 7a55f7b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

scala2-library-cc/src/scala/concurrent/ExecutionContext.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -294,5 +294,5 @@ object ExecutionContext {
294294
*
295295
* @return the function for error reporting
296296
*/
297-
final val defaultReporter: Throwable => Unit = _.printStackTrace()
297+
final val defaultReporter: Throwable -> Unit = _.printStackTrace()
298298
}

scala2-library-cc/src/scala/concurrent/impl/Promise.scala

+5-5
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,15 @@ private[concurrent] object Promise {
6969
/**
7070
* Compresses this chain and returns the currently known root of this chain of Links.
7171
**/
72-
final def promise(owner: DefaultPromise[T]^): DefaultPromise[T]^{cap.rd, this, to, owner} = {
72+
final def promise(owner: DefaultPromise[T]^): DefaultPromise[T]^{to, owner} = {
7373
val c = get()
7474
compressed(current = c, target = c, owner = owner)
7575
}
7676

7777
/**
7878
* The combination of traversing and possibly unlinking of a given `target` DefaultPromise.
7979
**/
80-
@inline @tailrec private[this] final def compressed(current: DefaultPromise[T]^{cap.rd, this}, target: DefaultPromise[T]^, owner: DefaultPromise[T]^): DefaultPromise[T]^{this, current, target, owner} = {
80+
@inline @tailrec private[this] final def compressed(current: DefaultPromise[T]^{this, to}, target: DefaultPromise[T]^{cap, this, current}, owner: DefaultPromise[T]^): DefaultPromise[T]^{to, target, owner} = {
8181
val value = target.get()
8282
if (value.isInstanceOf[Callbacks[_]]) {
8383
if (compareAndSet(current, target)) target // Link
@@ -151,7 +151,7 @@ private[concurrent] object Promise {
151151
val buffer = new AtomicReference[Success[Any]]()
152152
val zipped = new DefaultPromise[R]()
153153

154-
val thisF: Try[T] => Unit = {
154+
val thisF: Try[T] ->{f} Unit = {
155155
case left: Success[_] =>
156156
val right = buffer.getAndSet(left).asInstanceOf[Success[U]]
157157
if (right ne null)
@@ -160,7 +160,7 @@ private[concurrent] object Promise {
160160
zipped.tryComplete(f.asInstanceOf[Failure[R]])
161161
}
162162

163-
val thatF: Try[U] => Unit = {
163+
val thatF: Try[U] ->{f} Unit = {
164164
case right: Success[_] =>
165165
val left = buffer.getAndSet(right).asInstanceOf[Success[T]]
166166
if (left ne null)
@@ -349,7 +349,7 @@ private[concurrent] object Promise {
349349

350350
/** Link this promise to the root of another promise.
351351
*/
352-
@tailrec private[concurrent] final def linkRootOf(target: DefaultPromise[T]^, link: Link[T]^): Unit =
352+
@tailrec private[concurrent] final def linkRootOf(target: DefaultPromise[T]^, link: Link[T]^{cap, target}): Unit =
353353
if (this ne target) {
354354
val state = get()
355355
if (state.isInstanceOf[Try[_]]) {

0 commit comments

Comments
 (0)