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

equal == is not working on reval #512

Open
schlichtanders opened this issue Nov 21, 2023 · 2 comments
Open

equal == is not working on reval #512

schlichtanders opened this issue Nov 21, 2023 · 2 comments

Comments

@schlichtanders
Copy link

julia> reval("1") == reval("1")
false

I am wondering whether this is intended. Of course there is rcopy, but I thought comparison would work on the RObjects as well.

@schlichtanders schlichtanders changed the title equal == is not working on reval equal == is not working on reval Nov 21, 2023
@palday
Copy link
Collaborator

palday commented Nov 22, 2023

I don't think there is a == method defined, so it falls back to ===:

julia> @code_lowered reval("1") == reval("1")
CodeInfo(
1%1 = x === y
└──      return %1
)

and these are indeed two different Julia objects even if they point to the same R object.

@schlichtanders
Copy link
Author

That makes sense, thank you for the inspection.

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

2 participants