# @inferred x.a

**URL:** <https://discourse.julialang.org/t/inferred-x-a/18456>\
**Category:** Internals & Design\
**Tags:** question\
**Created:** [December 8, 2018, 9:25am UTC](https://discourse.julialang.org/t/inferred-x-a/18456 "2018-12-08T09:25:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [December 8, 2018, 9:25am UTC](https://discourse.julialang.org/t/inferred-x-a/18456/1 "2018-12-08T09:25:46Z")

</div>

(_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?

```julia
using Test
struct Foo end
Base.propertynames(::Foo) = (:a, )
Base.getproperty(foo::Foo, name::Symbol) = (@assert name ≡ :a; 1)

```

```julia
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

```
