-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Support erased arguments in splicer #6830
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
Support erased arguments in splicer #6830
Conversation
private final def removeEraisedArguments(args: List[Tree], fnTpe: Type): List[Tree] = { | ||
var result = args | ||
var index = 0 | ||
def loop(tp: Type): Unit = tp match { |
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.
It's not the most beautiful code I've written but it's reasonable in its non erased path and (IMO) pretty clear
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 think we should modify Call
to return a List[List[Tree]]
for the arguments. It would make this logic much simpler as each element of the outer list corresponds to one of the method types.
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.
Indeed, it's much simpler! :)
private final def removeEraisedArguments(args: List[Tree], fnTpe: Type): List[Tree] = { | ||
var result = args | ||
var index = 0 | ||
def loop(tp: Type): Unit = tp match { |
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 think we should modify Call
to return a List[List[Tree]]
for the arguments. It would make this logic much simpler as each element of the outer list corresponds to one of the method types.
d27d402
to
9a431dc
Compare
No description provided.