@@ -9,7 +9,7 @@ import org.junit.Test
99
1010class NakedAwait {
1111 @ Test
12- def `await only allowed in async neg` () {
12+ def `await only allowed in async neg` (): Unit = {
1313 expectError(" `await` must be enclosed in an `async` block" ) {
1414 """
1515 | import _root_.scala.async.Async._
@@ -19,7 +19,7 @@ class NakedAwait {
1919 }
2020
2121 @ Test
22- def `await not allowed in by-name argument` () {
22+ def `await not allowed in by-name argument` (): Unit = {
2323 expectError(" await must not be used under a by-name argument." ) {
2424 """
2525 | import _root_.scala.async.internal.AsyncId._
@@ -30,7 +30,7 @@ class NakedAwait {
3030 }
3131
3232 @ Test
33- def `await not allowed in boolean short circuit argument 1` () {
33+ def `await not allowed in boolean short circuit argument 1` (): Unit = {
3434 expectError(" await must not be used under a by-name argument." ) {
3535 """
3636 | import _root_.scala.async.internal.AsyncId._
@@ -40,7 +40,7 @@ class NakedAwait {
4040 }
4141
4242 @ Test
43- def `await not allowed in boolean short circuit argument 2` () {
43+ def `await not allowed in boolean short circuit argument 2` (): Unit = {
4444 expectError(" await must not be used under a by-name argument." ) {
4545 """
4646 | import _root_.scala.async.internal.AsyncId._
@@ -50,7 +50,7 @@ class NakedAwait {
5050 }
5151
5252 @ Test
53- def nestedObject () {
53+ def nestedObject (): Unit = {
5454 expectError(" await must not be used under a nested object." ) {
5555 """
5656 | import _root_.scala.async.internal.AsyncId._
@@ -60,7 +60,7 @@ class NakedAwait {
6060 }
6161
6262 @ Test
63- def nestedTrait () {
63+ def nestedTrait (): Unit = {
6464 expectError(" await must not be used under a nested trait." ) {
6565 """
6666 | import _root_.scala.async.internal.AsyncId._
@@ -70,7 +70,7 @@ class NakedAwait {
7070 }
7171
7272 @ Test
73- def nestedClass () {
73+ def nestedClass (): Unit = {
7474 expectError(" await must not be used under a nested class." ) {
7575 """
7676 | import _root_.scala.async.internal.AsyncId._
@@ -80,7 +80,7 @@ class NakedAwait {
8080 }
8181
8282 @ Test
83- def nestedFunction () {
83+ def nestedFunction (): Unit = {
8484 expectError(" await must not be used under a nested function." ) {
8585 """
8686 | import _root_.scala.async.internal.AsyncId._
@@ -90,7 +90,7 @@ class NakedAwait {
9090 }
9191
9292 @ Test
93- def nestedPatMatFunction () {
93+ def nestedPatMatFunction (): Unit = {
9494 expectError(" await must not be used under a nested class." ) { // TODO more specific error message
9595 """
9696 | import _root_.scala.async.internal.AsyncId._
@@ -100,7 +100,7 @@ class NakedAwait {
100100 }
101101
102102 @ Test
103- def tryBody () {
103+ def tryBody (): Unit = {
104104 expectError(" await must not be used under a try/catch." ) {
105105 """
106106 | import _root_.scala.async.internal.AsyncId._
@@ -110,7 +110,7 @@ class NakedAwait {
110110 }
111111
112112 @ Test
113- def catchBody () {
113+ def catchBody (): Unit = {
114114 expectError(" await must not be used under a try/catch." ) {
115115 """
116116 | import _root_.scala.async.internal.AsyncId._
@@ -120,7 +120,7 @@ class NakedAwait {
120120 }
121121
122122 @ Test
123- def finallyBody () {
123+ def finallyBody (): Unit = {
124124 expectError(" await must not be used under a try/catch." ) {
125125 """
126126 | import _root_.scala.async.internal.AsyncId._
@@ -130,7 +130,7 @@ class NakedAwait {
130130 }
131131
132132 @ Test
133- def guard () {
133+ def guard (): Unit = {
134134 expectError(" await must not be used under a pattern guard." ) {
135135 """
136136 | import _root_.scala.async.internal.AsyncId._
@@ -140,7 +140,7 @@ class NakedAwait {
140140 }
141141
142142 @ Test
143- def nestedMethod () {
143+ def nestedMethod (): Unit = {
144144 expectError(" await must not be used under a nested method." ) {
145145 """
146146 | import _root_.scala.async.internal.AsyncId._
@@ -150,7 +150,7 @@ class NakedAwait {
150150 }
151151
152152 @ Test
153- def returnIllegal () {
153+ def returnIllegal (): Unit = {
154154 expectError(" return is illegal" ) {
155155 """
156156 | import _root_.scala.async.internal.AsyncId._
@@ -162,7 +162,7 @@ class NakedAwait {
162162 }
163163
164164 @ Test
165- def lazyValIllegal () {
165+ def lazyValIllegal (): Unit = {
166166 expectError(" await must not be used under a lazy val initializer" ) {
167167 """
168168 | import _root_.scala.async.internal.AsyncId._
0 commit comments