We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
_promote_symtype
1 parent d3dcdde commit ad6dff7Copy full SHA for ad6dff7
src/types.jl
@@ -915,18 +915,16 @@ end
915
function _promote_symtype(f, args)
916
if issym(f)
917
promote_symtype(f, map(symtype, args)...)
918
+ elseif length(args) == 0
919
+ promote_symtype(f)
920
+ elseif length(args) == 1
921
+ promote_symtype(f, symtype(args[1]))
922
+ elseif length(args) == 2
923
+ promote_symtype(f, symtype(args[1]), symtype(args[2]))
924
+ elseif isassociative(f)
925
+ mapfoldl(symtype, (x, y) -> promote_symtype(f, x, y), args)
926
else
- if length(args) == 0
- promote_symtype(f)
- elseif length(args) == 1
- promote_symtype(f, symtype(args[1]))
- elseif length(args) == 2
- promote_symtype(f, symtype(args[1]), symtype(args[2]))
- elseif isassociative(f)
- mapfoldl(symtype, (x,y) -> promote_symtype(f, x, y), args)
927
- else
928
- promote_symtype(f, map(symtype, args)...)
929
- end
+ promote_symtype(f, map(symtype, args)...)
930
end
931
932
0 commit comments