# @code\_warntype gives yellow ::Union{Nothing, Tuple{Int64,Int64}} in for loops

**URL:** <https://discourse.julialang.org/t/code-warntype-gives-yellow-union-nothing-tuple-int64-int64-in-for-loops/52814>\
**Category:** Performance\
**Tags:** question, type\
**Created:** [January 4, 2021, 10:09am UTC](https://discourse.julialang.org/t/code-warntype-gives-yellow-union-nothing-tuple-int64-int64-in-for-loops/52814 "2021-01-04T10:09:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![claudio20497](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/claudio20497/32/36602_2.png) [@claudio20497](https://discourse.julialang.org/u/claudio20497)\
**Post date:** [January 4, 2021, 10:09am UTC](https://discourse.julialang.org/t/code-warntype-gives-yellow-union-nothing-tuple-int64-int64-in-for-loops/52814/1 "2021-01-04T10:09:24Z")

</div>

Hello,

I’d have the following usage question.

If I have a function with a for loop inside, like:

```julia
function f()
    for i in 1:2
    end
end

```

And I call `@code_warntype` on it, i get a yellow line:

```julia
@code_warntype f()

```

```diff
Variables
  #self#::Core.Compiler.Const(f, false)
! @_2::Union{Nothing, Tuple{Int64,Int64}}
  i::Int64

Body::Nothing
1 ─ %1 = (1:2)::Core.Compiler.Const(1:2, false)
│ (@_2 = Base.iterate(%1))
│ %3 = (@_2::Core.Compiler.Const((1, 1), false) === nothing)::Core.Compiler.Const(false, false)
│ %4 = Base.not_int(%3)::Core.Compiler.Const(true, false)
└── goto #4 if not %4
2 ┄ %6 = @_2::Tuple{Int64,Int64}::Tuple{Int64,Int64}
│ (i = Core.getfield(%6, 1))
│ %8 = Core.getfield(%6, 2)::Int64
│ (@_2 = Base.iterate(%1, %8))
│ %10 = (@_2 === nothing)::Bool
│ %11 = Base.not_int(%10)::Bool
└── goto #4 if not %11
3 ─ goto #2
4 ┄ return

```

( I did my best using [this trick](https://stackoverflow.com/questions/11509830/how-to-add-color-to-githubs-readme-md-file/39413824#39413824) to make colored text in markdown)

**So what does the yellow line mean? Is it something to be worried about? If so, how to fix it?**

Thank you very much

---

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [January 4, 2021, 12:41pm UTC](https://discourse.julialang.org/t/code-warntype-gives-yellow-union-nothing-tuple-int64-int64-in-for-loops/52814/2 "2021-01-04T12:41:28Z")

</div>

> [@claudio20497](#):
>
> ```julia
> function f()
> for i in 1:2
> end
> end
> 
> ```

The `for` loop returns that union always which is either the termination (`nothing`) or the text iterate. That is normal and you should not worry about it.

This is the section of the manual explaining the [iterators’ interfaces](https://docs.julialang.org/en/v1/manual/interfaces/).
