Skip to content

Conversation

Yunuuuu
Copy link
Contributor

@Yunuuuu Yunuuuu commented Jul 18, 2025

Fix partial: #6544

S7::new_class("CraftBox",
    properties = list(
        plot = ggplot2::class_ggplot
    )
)
#> Error: `ggplot2::ggplot` is not identical to the class with the same @package and @name properties

This commit ensures that the constructor has the same name as the S7 class, and it attaches the original class name to the object during construction.

@Yunuuuu
Copy link
Contributor Author

Yunuuuu commented Jul 18, 2025

image

@teunbrand
Copy link
Collaborator

I don't like changing the class names. They're used in error messages and it'll expose implementation details that are confusing to users.

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