Skip to content

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

Merged

Conversation

OlivierBlanvillain
Copy link
Contributor

No description provided.

private final def removeEraisedArguments(args: List[Tree], fnTpe: Type): List[Tree] = {
var result = args
var index = 0
def loop(tp: Type): Unit = tp match {
Copy link
Contributor Author

@OlivierBlanvillain OlivierBlanvillain Jul 9, 2019

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

Copy link
Contributor

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.

Copy link
Contributor Author

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 {
Copy link
Contributor

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.

@OlivierBlanvillain OlivierBlanvillain force-pushed the support-erased-arguments-in-splicer branch from d27d402 to 9a431dc Compare July 10, 2019 15:41
@nicolasstucki nicolasstucki merged commit 15b9cd8 into scala:master Jul 11, 2019
@nicolasstucki nicolasstucki deleted the support-erased-arguments-in-splicer branch July 11, 2019 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants