We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactoring an inline method like i5_1, into i5_2 seems natural. Since the RHS is a complex block this is not permitted.
i5_1
i5_2
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?
The text was updated successfully, but these errors were encountered:
The issue is probably that i5_2 is expanded to
inline def i5_2[T](n: T): Contextual[T] = (x$1: Ctx) |=> ~{ '(n) }
which we do not handle
Sorry, something went wrong.
Fix scala#5840: Give more informative error message
3ef2459
Also me more precise on the position where a macro is malformed.
23663fe
49fff11
Merge pull request #6804 from dotty-staging/fix-#5840
35c7dcb
Fix #5840: Give more informative error message
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
Refactoring an inline method like
i5_1
, intoi5_2
seems natural. Since the RHS is a complex block this is not permitted.What would be better: to let it pass it through or just improve the error message?
The text was updated successfully, but these errors were encountered: