Closed
Description
Refactoring an inline method like i5_1
, into i5_2
seems natural. Since the RHS is a complex block this is not permitted.
object Test {
case class Ctx()
type Contextual[T] = given Ctx => T
inline def i5_1[T](n: T)(implicit thisCtx: Ctx): T = ${ 'n } // OK
inline def i5_2[T](n: T): Contextual[T] = ${ println(); 'n } // error: malformed macro
}
What would be better: to let it pass it through or just improve the error message?