-
-
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
typeintersect Vararg aborts #44735
Comments
Well, |
Maybe we want to do some assertions on Julia level? |
looks like it no longer crashes on master julia> typeintersect(Vararg{Int}, Int)
Union{} |
You need to have assert build to repro this. |
I see. as for adding checks on the Julia side, is this too naive/hacky? function typeintersect(@nospecialize(a), @nospecialize(b))
@_pure_meta
if typeof(a) !== DataType
throw(TypeError(:typeintersect, DataType, a))
elseif typeof(b) !== DataType
throw(TypeError(:typeintersect, DataType, b))
end
ccall(:jl_type_intersection, Any, (Any, Any), a, b)
emd |
Checking |
😅 right; I see @aviatesk has done this on the C side in his branch so I won't make a PR. |
this is not good:
and other mild oddities (I think these are correct, since they can appear as type parameters, they should be valid as arguments also)
The text was updated successfully, but these errors were encountered: