-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Closed
Description
With dot-function calls, @code_lowered
& friends error when the argument is a variable name. e.g. The dot syntax works when some arguments of a multi-argument function is just a number and not an array, such as for the example here,
f(x,y) = 3x + 4y
A = [1.0, 2.0, 3.0]
f.(pi, A)
where the dot is broadcasting for the 2nd argument of f
. For this example:
@code_lowered f.(pi, A)
errors with
type Symbol has no field head
Stacktrace:
[1] getproperty(::Symbol, ::Symbol) at ./Base.jl:33
...
(same with @code_typed
and @code_llvm
, @code_native
).
@code_lowered f.(A,A)
also fails
ERROR: LoadError: type Symbol has no field head
Stacktrace:
[1] getproperty(::Symbol, ::Symbol) at ./Base.jl:33
...
however, @code_lowered f.(rand(3), rand(3))
does not error.
There was #35522 but this issue also occurs on master
julia> versioninfo()
Julia Version 1.6.0-DEV.173
Commit 8c65f8d987* (2020-06-05 00:08 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin19.5.0)
CPU: Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-9.0.1 (ORCJIT, skylake)
Metadata
Metadata
Assignees
Labels
No labels