-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
missing sub2ind ambiguity detection confuses inference #18307
Comments
use milestones, not backport pending label if there isn't a PR yet |
Another missing ambiguity from #17003 that might be related julia> abstract A{T}
julia> type B{T} <: A{T}
end
julia> f1(::A{Int}) = 1
f1 (generic function with 1 method)
julia> f1(::B) = 2
f1 (generic function with 2 methods)
julia> f1(B{Int}())
2 Here |
probably will get fixed by #18457? |
The OP example seems to be working now. |
This has a test in test/ambiguous that claims the methods should be ambiguous, but aren't currently. I'm not sure they really are ambiguous though. |
came across this while investigating why the inference of
isassigned
is bad. it seems thesub2ind
definitions cause several problems for type intersection. for example:this is caused by the intersection of the following 3 methods:
testing with:
with all 3,
@which
thinks none will be called, but actually 2 gets (incorrectly) calledwith just method 1 and 2,
@which
thinks that 1 will definitely be called (but 2 is actually – correctly – called)with just 1 and 3, it fails correctly
with just 2 and 3, it works correctly
The text was updated successfully, but these errors were encountered: