Skip to content

Commit e1a1859

Browse files
author
Matteo Di Pirro
committed
SCALA-463 Add comments to commented code
1 parent 792b517 commit e1a1859

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

scala-libraries-4/src/test/scala/com/baeldung/scala/async/ScalaAsyncTest.scala

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,19 @@ object ScalaAsyncTest {
3131
await(r1) + await(r2)
3232
}
3333

34-
/*def invalid = async {
34+
/* Uncommenting this snippet will produce the following error:
35+
await must not be used under a nested method. await(slowComputation)
36+
37+
def invalid = async {
3538
def localFunction = {
3639
await(slowComputation)
3740
}
3841
3942
localFunction
40-
}
43+
}*/
44+
45+
/* Uncommenting this snippet will produce the following error:
46+
await must not be used under a try/catch. await(slowComputation)
4147
4248
def tryCatch = async {
4349
try {

0 commit comments

Comments
 (0)