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

Method ambiguities from destructor wrappers #63

Open
JamesWrigley opened this issue Jun 25, 2024 · 2 comments
Open

Method ambiguities from destructor wrappers #63

JamesWrigley opened this issue Jun 25, 2024 · 2 comments

Comments

@JamesWrigley
Copy link
Contributor

When running Aqua.jl on my package with Aqua.test_all(ImGuiTestEngine) I get a bazillion method ambiguity warnings like this:

Ambiguity #11169                                                                                                                                                                                                                               
__delete(arg1::Union{Ptr{Nothing}, CxxWrap.CxxWrapCore.CxxPtr{<:ImGuiTestEngine.lib.ImGuiTestItemInfo}}) @ ImGuiTestEngine.lib ~/.julia/packages/CxxWrap/eWADG/src/CxxWrap.jl:668                                                              
__delete(arg1::Union{Ptr{Nothing}, CxxWrap.CxxWrapCore.CxxPtr{<:CxxWrap.StdLib.StdUnorderedMultiset{UInt8}}}) @ CxxWrap.StdLib ~/.julia/packages/CxxWrap/eWADG/src/CxxWrap.jl:668                                                              
                                                                                                                                                                                                                                               
Possible fix, define                                                                                                                                                                                                                           
  __delete(::Union{Ptr{Nothing}, CxxWrap.CxxWrapCore.CxxPtr{Union{}}})

Unfortunately the package (https://github.com/JuliaImGui/ImGuiTestEngine.jl) is not easily installable right now because it requires an unmerged JLL, so I don't have an easy reproducer 🥲 Anyway, it's not particularly urgent for me.

@grasph
Copy link
Owner

grasph commented Jun 25, 2024

I'm including @barche, as it looks like an issue with CxxWrap.

I don't get where the ambiguity is. Looking at imgui_te_engine.h L295, I understand ImGuiTestEngine.lib.ImGuiTestItemInfo is a struct and has therefore no relation with StdUnorderedMultiset. @JamesWrigley do you have more insights on what can make the choice between the two methods ambiguous? Maybe, if you can explicitly call CxxWrap.CxxWrapCore.__delete with ImGuiTestItemInfo you will get a Julia error message giving more information. (I missed the union with Ptr{Nothing})

@JamesWrigley
Copy link
Contributor Author

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