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

add broken test case showing issue when nested class used via Java class #41

Closed
wants to merge 4 commits into from

Conversation

pjfanning
Copy link
Contributor

Relates to #40

@gzoller
Copy link
Owner

gzoller commented Nov 12, 2022

Unfortunately I don't think the case you highlight here is not possible to fix (RType.of(classOf[BigObject.LittleThing]))
Here's the problem. When you use the compile-time square brackets, much more information is available. You get:

TypeRef(TermRef(ThisType(TypeRef(NoPrefix,module class scala_reflection)),object BigObject),class LittleThing)

From here you know that you have a BigObject$LittleThing.

When you use the runtime parentheses for 'of', you get:

TypeRef(TermRef(NoPrefix,val <none>),LittleThing)

This tells you nothing except that you have a LittleThing. It erased the rest, unfortunately.

@gzoller gzoller closed this Nov 12, 2022
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