You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was doing some work in Base and compiling a bunch of times. Once, non-deterministically, these ambiguity warning showed up during make:
subarray2.jl
Warning: New definition
getindex could not show value of type Tuple at subarray2.jl:84
is ambiguous with:
getindex could not show value of type Tuple at subarray2.jl:83.
To fix, define
getindex could not show value of type Tuple
before the new definition.
I wasn't doing anything related to subarrays or to getindex, and I checked that the warning disappeared when forcing make to run again without actually changing anything. Actually, I tried to reproduce it without success for at least 20 times. So I don't know what's the value of reporting, perhaps it's just the result of corruption in some totally unrelated area, but maybe someone can use this as a hint and find the bug (I don't know if this is related to other ambiguity issues, but I haven't found anything about non-deterministic ones).
It seems the warning is spurious, since these two definitions do not lead to any ambiguity, although it's not trivial to see that, and in fact I haven't managed to reproduce the warning at the REPL. Plus, the other getindex definitions in subarray.jl (particularly this one) would also help disambiguate anyway.
I only plan to work on this via #8974, which already lists 11 ambiguity-related issues. But you might be right that this indicates corruption elsewhere while loading that file, so that should maybe be investigated.
I've seen this quite a number of times, but you're right that it's rare. I've had the same experience with non-deterministic warnings on loading the Images.jl package (JuliaImages/Images.jl#59).
I was doing some work in Base and compiling a bunch of times. Once, non-deterministically, these ambiguity warning showed up during make:
I wasn't doing anything related to subarrays or to getindex, and I checked that the warning disappeared when forcing make to run again without actually changing anything. Actually, I tried to reproduce it without success for at least 20 times. So I don't know what's the value of reporting, perhaps it's just the result of corruption in some totally unrelated area, but maybe someone can use this as a hint and find the bug (I don't know if this is related to other ambiguity issues, but I haven't found anything about non-deterministic ones).
For completeness: the warning refers to the following two lines in subarray.jl:
It seems the warning is spurious, since these two definitions do not lead to any ambiguity, although it's not trivial to see that, and in fact I haven't managed to reproduce the warning at the REPL. Plus, the other
getindex
definitions in subarray.jl (particularly this one) would also help disambiguate anyway.I saw this while I was based on commit 3cc1752.
The text was updated successfully, but these errors were encountered: