Skip to content

Fix reflect typeMembers to return all members #15033

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
merged 2 commits into from
Nov 23, 2022

Conversation

nicolasstucki
Copy link
Contributor

Fixes #14902

@pikinier20
Copy link
Contributor

I've pushed a commit repairing Scaladoc tests

@nicolasstucki
Copy link
Contributor Author

I've pushed a commit repairing Scaladoc tests

Did not notice this commit and force pushed the fix I had. @pikinier20 is this the same fix that you did?

@pikinier20
Copy link
Contributor

I've pushed a commit repairing Scaladoc tests

Did not notice this commit and force pushed the fix I had. @pikinier20 is this the same fix that you did?

Yes, it is. Sorry for messing up :)

Copy link
Contributor

@pikinier20 pikinier20 left a comment

Choose a reason for hiding this comment

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

The changes in Scaladoc are fine. However, I'm not a person who can approve changes in compiler API.

@pikinier20 pikinier20 removed their assignment Apr 26, 2022
@nicolasstucki nicolasstucki requested a review from smarter April 26, 2022 15:12
@nicolasstucki
Copy link
Contributor Author

Note that the other fixes in the documentation are in #15034

@@ -2619,13 +2619,15 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler
case sym if sym.isType => sym.asType
}.toList

def memberType(name: String): Symbol = typeMember(name)
def typeMember(name: String): Symbol =
def memberType(name: String): Symbol =
self.unforcedDecls.find(sym => sym.name == name.toTypeName)
Copy link
Member

Choose a reason for hiding this comment

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

I guess this was present before, but any reason we use unforcedDecls here? That could also miss declarations.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I do not belive there was a particular reason. Which method would you use instead?

Copy link
Member

Choose a reason for hiding this comment

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

decls

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@smarter smarter merged commit c9ace66 into scala:main Nov 23, 2022
@smarter smarter deleted the fix-14902 branch November 23, 2022 13:11
xerial added a commit to wvlet/airframe that referenced this pull request May 23, 2023
@Kordyjan Kordyjan added this to the 3.3.0 milestone Aug 2, 2023
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.

Can't get inherited types from Quotes
4 participants