File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
test/scala/scala/async/neg Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ package scala.async
66
77import scala .language .experimental .macros
88import scala .reflect .macros .Context
9+ import scala .reflect .internal .annotations .compileTimeOnly
910
1011object Async extends AsyncBase {
1112
@@ -56,8 +57,7 @@ abstract class AsyncBase {
5657 * @tparam T the type of that value.
5758 * @return the value.
5859 */
59- // TODO Replace with `@compileTimeOnly when this is implemented SI-6539
60- @ deprecated(" `await` must be enclosed in an `async` block" , " 0.1" )
60+ @ compileTimeOnly(" `await` must be enclosed in an `async` block" )
6161 def await [T ](awaitable : futureSystem.Fut [T ]): T = ???
6262
6363 protected [async] def fallbackEnabled = false
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import org.junit.Test
1313class NakedAwait {
1414 @ Test
1515 def `await only allowed in async neg` () {
16- expectError(" `await` must be enclosed in an `async` block" , " -deprecation -Xfatal-warnings " ) {
16+ expectError(" `await` must be enclosed in an `async` block" ) {
1717 """
1818 | import _root_.scala.async.Async._
1919 | await[Any](null)
You can’t perform that action at this time.
0 commit comments