# Red output from @code\_warntype on my custom structures

**URL:** <https://discourse.julialang.org/t/red-output-from-code-warntype-on-my-custom-structures/132395>\
**Category:** New to Julia\
**Created:** [September 15, 2025, 12:04pm UTC](https://discourse.julialang.org/t/red-output-from-code-warntype-on-my-custom-structures/132395 "2025-09-15T12:04:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Boris](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/boris/32/3306_2.png) [@Boris](https://discourse.julialang.org/u/Boris)\
**Post date:** [September 15, 2025, 12:04pm UTC](https://discourse.julialang.org/t/red-output-from-code-warntype-on-my-custom-structures/132395/1 "2025-09-15T12:04:14Z")

</div>

Hi.

**Long story short,** I have some custom types in my code and if I do `@code_warntype` on the functions that use them I see them in red. Nothing else is red, there are no `Any` or weird unions, just the color of the structures is red. I am attaching a picture, because copying the code here and formatting it loses the red color.

 ![grafik](https://global.discourse-cdn.com/julialang/original/3X/1/d/1d52f73ff530e30329ad5df0fe8385e513804536.png)

Main question: Should I care? I don’t think I have any performance issues.

**A bit longer story:**  
I am not sure I can give a MWE, but I hope that I could get some help in spite of that.

I have the following nested structure

| `f#1` Main entry function, gets generic input  
| \_\> `f#2` second function takes this input and depending on it dispatches to different models  
| \_\_\_\> `f#3` main function, where the magic happens

I have defined custom types whose instances get generated in f#1, depending on user input.

If I run `@code_warntype` on f#1 I get my custom types in red. Nothing else. No Any or other problems.

If I rewrite the nested functions, such that I desn’t utilize the custom types and dipstach, the red color disappears. If I then `@btime` both the code above (the nested functions) that gives red colors versus the one without I get identical times.

Also, the main function that does the calculation is always type stable according to `@code_warntype`, and this is where the whole program essentially runs.
