# Unexpected REPL display issues after overloading

**URL:** <https://discourse.julialang.org/t/unexpected-repl-display-issues-after-overloading/143015>\
**Category:** General Usage\
**Created:** [November 18, 2026, 5:24pm UTC](https://discourse.julialang.org/t/unexpected-repl-display-issues-after-overloading/143015 "2026-11-18T17:24:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![munstef](https://avatars.discourse-cdn.com/v4/letter/m/bc8723/32.png) [@munstef](https://discourse.julialang.org/u/munstef)\
**Post date:** [November 18, 2026, 5:24pm UTC](https://discourse.julialang.org/t/unexpected-repl-display-issues-after-overloading/143015/1 "2026-11-18T17:24:09Z")

</div>

Is it intentional that defining `getproperty(::Type{MyType}, ...)` appears to interfere with REPL display and introspection of the type itself, even when unknown properties are delegated to `getfield`?

```julia-auto
struct V{P} end

function Base.getproperty(T::Type{V{P}}, sym::Symbol) where P
    if sym == :foo
        return n -> n * P
    else
        getfield(V{P}, sym)
    end
end

V{5}

```

The type itself appears to be perfectly usable. Assignment, property access, and callable-type behavior all work correctly:

```julia-auto
T = V{5}; 
T.foo(7)
T.name

```

Interestingly, the issue does not seem to affect the type’s functionality. It only surfaces when the REPL attempts to display the type.

Since the custom property works and unknown properties are forwarded to `getfield`, I am wondering whether this behavior is intentional or whether it might be a corner case in the REPL display machinery.

---

<div class="post-metadata">

**Author:** ![eldee](https://avatars.discourse-cdn.com/v4/letter/e/b5a626/32.png) [@eldee](https://discourse.julialang.org/u/eldee)\
**Post date:** [November 18, 2026, 6:05pm UTC](https://discourse.julialang.org/t/unexpected-repl-display-issues-after-overloading/143015/2 "2026-11-18T18:05:08Z")

</div>

Hi, and welcome to the Julia community!

* * *

> [@munstef](#):
>
> unknown properties are delegated to `getfield`

This doesn’t really get to the heart of your question, but let me point out that if you delegate using `T` instead of `V{P}` everything seems fine:

```julia-auto
julia> struct V{P} end

julia> function Base.getproperty(T::Type{V{P}}, sym::Symbol) where P
           if sym == :foo
               return n -> n * P
           else
               getfield(T, sym)
           end
       end

julia> V{5}
V{5}

```
