-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Allow macros to call method returning implicit functions #5299
New issue
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
Allow macros to call method returning implicit functions #5299
Conversation
Extracted from #5297 |
I first tried to call the method and then call reflectively the apply method of the lambda. This did not work, the reflective call crashed saying that it cannot call a method marked as "public" 😂. |
ab2a098
to
b8aac4d
Compare
CI is not happy. |
b8aac4d
to
659e7ee
Compare
Fixed it |
@@ -347,6 +347,8 @@ object Splicer { | |||
|
|||
object Call { | |||
def unapply(arg: Tree): Option[(RefTree, List[Tree])] = arg match { | |||
case Select(Call(fn, args), nme.apply) if defn.isImplicitFunctionType(fn.tpe.widenDealias.finalResultType) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was missing this guard.
Fixed it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.