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

Get generic signature of fields entered after erasure from their accessor #19207

Merged
merged 1 commit into from
Dec 8, 2023

Conversation

EugeneFlesselle
Copy link
Contributor

@EugeneFlesselle EugeneFlesselle changed the title [WIP] Get generic signature of fields entered after erasure from their corresponding accessor [WIP] Get generic signature of fields entered after erasure from their accessor Dec 5, 2023
@EugeneFlesselle EugeneFlesselle marked this pull request as ready for review December 5, 2023 21:22
@EugeneFlesselle EugeneFlesselle changed the title [WIP] Get generic signature of fields entered after erasure from their accessor Get generic signature of fields entered after erasure from their accessor Dec 6, 2023
@sjrd sjrd self-assigned this Dec 6, 2023
Comment on lines 6 to 8
val tpe = classOf[Foo].getDeclaredField("generic").getGenericType()
val tpe2 = classOf[Foo].getDeclaredMethod("generic").getGenericReturnType()
assert(tpe == tpe2)
Copy link
Member

Choose a reason for hiding this comment

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

This test will still pass if both the field and getter have broken signatures. We should also actually test the structure of tpe.

@sjrd
Copy link
Member

sjrd commented Dec 8, 2023

LGTM. Would you mind squashing all the commits in a single one? The individual commits here don't bring any value for the future user of git blame.

@mbovel
Copy link
Member

mbovel commented Dec 8, 2023

@EugeneFlesselle: as you are rebasing, you can add @entangled90 and @AnotherMedo as co-authors.

Co-authored-by: Carlo Sana <sana.carlo@gmail.com>
Co-authored-by: Matt Bovel <matthieu@bovel.net>
@sjrd sjrd merged commit 5a70e5a into scala:main Dec 8, 2023
19 checks passed
@Kordyjan Kordyjan added this to the 3.4.0 milestone Dec 20, 2023
@EugeneFlesselle EugeneFlesselle deleted the mb/17069 branch January 29, 2024 08:45
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 generic type in JVM signature of public field
4 participants