Skip to content

Commit 56d62a6

Browse files
committed
Macros require explicit return type
1 parent 6d3cecb commit 56d62a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/scala/scala/async/internal/AsyncId.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ object AsyncId extends AsyncBase {
1212
lazy val futureSystem = IdentityFutureSystem
1313
type FS = IdentityFutureSystem.type
1414

15-
def async[T](body: => T) = macro asyncIdImpl[T]
15+
def async[T](body: => T): T = macro asyncIdImpl[T]
1616

1717
def asyncIdImpl[T: c.WeakTypeTag](c: Context)(body: c.Expr[T]): c.Expr[T] = asyncImpl[T](c)(body)(c.literalUnit)
1818
}
@@ -21,7 +21,7 @@ object AsyncTestLV extends AsyncBase {
2121
lazy val futureSystem = IdentityFutureSystem
2222
type FS = IdentityFutureSystem.type
2323

24-
def async[T](body: T) = macro asyncIdImpl[T]
24+
def async[T](body: T): T = macro asyncIdImpl[T]
2525

2626
def asyncIdImpl[T: c.WeakTypeTag](c: Context)(body: c.Expr[T]): c.Expr[T] = asyncImpl[T](c)(body)(c.literalUnit)
2727

0 commit comments

Comments
 (0)