Skip to content

Rename reflection Class[?] to Type conversion #9798

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

nicolasstucki
Copy link
Contributor

No description provided.

@nicolasstucki nicolasstucki self-assigned this Sep 15, 2020
@nicolasstucki nicolasstucki force-pushed the rename-reflection-classof-type branch from 3bfe7a0 to 0d2c851 Compare September 15, 2020 11:42
@nicolasstucki
Copy link
Contributor Author

Based on #9797

*
* See `Type.of` to get the true type.
*/
def ofErasedClass(clazz: Class[_])(using ctx: Context): Type =
Copy link
Member

Choose a reason for hiding this comment

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

Is this actually used by anything else than scala.quoted.ClassLiftable? If not, could we make it private[scala] unless and until we discover an imperative use case outside?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point.

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 don't see any uses outside lifting arrays

@nicolasstucki nicolasstucki force-pushed the rename-reflection-classof-type branch from 73944a2 to c095fab Compare September 15, 2020 15:50
We only require this type representation to be able to lift and handle generic arrays.
We will use this internally only as long as no real use case for this functionality appears.
@nicolasstucki nicolasstucki force-pushed the rename-reflection-classof-type branch from c095fab to c9de0e1 Compare September 16, 2020 08:58
Copy link
Member

@sjrd sjrd left a comment

Choose a reason for hiding this comment

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

I like this much better!

@nicolasstucki nicolasstucki marked this pull request as ready for review September 16, 2020 09:33
@nicolasstucki nicolasstucki merged commit 07fae04 into scala:master Sep 16, 2020
@nicolasstucki nicolasstucki deleted the rename-reflection-classof-type branch September 16, 2020 15:05
@Kordyjan Kordyjan added this to the 3.0.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.

4 participants