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
This might already be known - there seem to be a few issues around keyword arguments and constant propagation / type inference, but I'm not really in the loop and it wasn't sure how out of date the issues are.
For z1 and x1, inference seems OK. For x2, it seems to break (can only get DataType out), despite the fact that the non-kwargs version z2 infers something more precise (Type{Int64}).
The real usecase I met this in was trying to implement something like Base.dropdims(a::MyType; dims) = _dropdims(a, dims). Inference was completely failing, despite _dropdims(my_object, 3) inferring perfectly.
Ran on master:
julia> versioninfo()
Julia Version 1.4.0-DEV.103
Commit cb76f2a0e7 (2019-09-06 22:43 UTC)
Platform Info:
OS: Linux (x86_64-redhat-linux)
CPU: Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.1 (ORCJIT, skylake)
The text was updated successfully, but these errors were encountered:
This might already be known - there seem to be a few issues around keyword arguments and constant propagation / type inference, but I'm not really in the loop and it wasn't sure how out of date the issues are.
An attempt at a MWE:
For
z1
andx1
, inference seems OK. Forx2
, it seems to break (can only getDataType
out), despite the fact that the non-kwargs versionz2
infers something more precise (Type{Int64}
).The real usecase I met this in was trying to implement something like
Base.dropdims(a::MyType; dims) = _dropdims(a, dims)
. Inference was completely failing, despite_dropdims(my_object, 3)
inferring perfectly.Ran on master:
The text was updated successfully, but these errors were encountered: