Skip to content
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

Fix generic signatures of generic methods #3414

Merged
merged 1 commit into from Oct 31, 2017

Conversation

Duhemm
Copy link
Contributor

@Duhemm Duhemm commented Oct 31, 2017

We ignored the case where a MethodType had another MethodType as
result type. This commit fixes the issue by collecting the parameters of
the result type if it is a MethodType, recursively.

Fixes #3411

// phantom method parameters do not make it to the bytecode.
val params = mtpe.paramInfos.filterNot(_.isPhantom)
val restpe = mtpe.resultType
val params = allParamTypes(mtpe).filterNot(_.isPhantom)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.paramInfoss

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's much better, thanks.

@nicolasstucki
Copy link
Contributor

Btw, the convention for the commit message fixing a bug would beFix #3411: Fix generic signatures of generic methods.

We ignored the case where a `MethodType` had another `MethodType` as
result type. This commit fixes the issue by collecting the parameters of
the result type if it is a `MethodType`, recursively.

Fixes scala#3411
@allanrenucci allanrenucci merged commit 0949860 into scala:master Oct 31, 2017
@Duhemm Duhemm deleted the fix/i3411 branch November 30, 2018 07:56
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.

Missing parameter list in JavaGeneric signature
4 participants