@inferred x.a

question

#1

(Asking here before opening an issue.)

Apparently @inferred does not recognize x.a forms as calls, and I could not find an existing issue, is there one?

using Test
struct Foo end
Base.propertynames(::Foo) = (:a, )
Base.getproperty(foo::Foo, name::Symbol) = (@assert name ≡ :a; 1)
julia> VERSION
v"1.1.0-DEV.841"

julia> foo = Foo()
Foo()

julia> @inferred(getproperty(foo, :a))
1

julia> @inferred(foo.a)
ERROR: LoadError: @inferred requires a call expression
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] @inferred(::LineNumberNode, ::Module, ::Any) at /home/tamas/src/julia-git/usr/share/julia/stdlib/v1.1/Test/src/Test.jl:1301
in expression starting at REPL[46]:1