You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/scala/scala/async/Async.scala
+3-5
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ package scala.async
15
15
importscala.language.experimental.macros
16
16
importscala.concurrent.{ExecutionContext, Future}
17
17
importscala.annotation.compileTimeOnly
18
-
importscala.reflect.macros.whitebox
18
+
importscala.reflect.macros.blackbox
19
19
20
20
/**
21
21
* Async blocks provide a direct means to work with [[scala.concurrent.Future]].
@@ -60,11 +60,9 @@ object Async {
60
60
* in the `onComplete` handler of `awaitable`, and will *not* block a thread.
61
61
*/
62
62
@compileTimeOnly("[async] `await` must be enclosed in an `async` block")
63
-
defawait[T](awaitable: Future[T]):T=???// No implementation here, as calls to this are translated to `onComplete` by the macro.
63
+
defawait[T](awaitable: Future[T]):T=thrownewUnsupportedOperationException("Calls to Async.await should have been treated as compiler intrinsics and rewritten!")
0 commit comments