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

object is invalid error when new_object argument .parent is assigned S7_object instead of S7_object() #502

Open
tschwarzl opened this issue Nov 22, 2024 · 0 comments

Comments

@tschwarzl
Copy link

I would like to report a user error which leads to creation of seemingly valid S7 object, however, throws an error later.

When within the S7 constructor the function new_object is called and .parent is assigned S7_object instead of S7_object() a class is created without error.
However, when assigning a property to an object of said class it can lead to object is invalid: - Underlying data is corrupt error.

Unfortunately, (and to my surprise) I was not able to create a minimal example reproducing the error so far.

To prevent other users running into this rather hard to debug problem, I would like to discuss a type check for .parent

> class(S7_object)
[1] "S7_class"  "S7_object"
> class(S7_object())
[1] "S7_object"
tschwarzl pushed a commit to tschwarzl/S7 that referenced this issue Nov 22, 2024
…nforcing S7_object and prohibiting S7_class passing.
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

No branches or pull requests

1 participant