# Weird case of the where's

**URL:** <https://discourse.julialang.org/t/weird-case-of-the-wheres/63491>\
**Category:** General Usage\
**Tags:** functions\
**Created:** [June 24, 2021, 9:44am UTC](https://discourse.julialang.org/t/weird-case-of-the-wheres/63491 "2021-06-24T09:44:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rakeshvar](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rakeshvar/32/3613_2.png) [@rakeshvar](https://discourse.julialang.org/u/rakeshvar)\
**Post date:** [June 24, 2021, 9:44am UTC](https://discourse.julialang.org/t/weird-case-of-the-wheres/63491/1 "2021-06-24T09:44:17Z")

</div>

```julia
julia> function f(::f) where f
       f
       end
f (generic function with 0 methods)

julia> function g(::f) where f
       f
       end
g (generic function with 1 method)

```

Why does the first definition fail to work while the second does? I mean why does the first one have no methods?

---

<div class="post-metadata">

**Author:** ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)\
**Post date:** [June 24, 2021, 10:07am UTC](https://discourse.julialang.org/t/weird-case-of-the-wheres/63491/2 "2021-06-24T10:07:03Z")

</div>

This is a bug, you should report it (if it wasn’t yet).

---

<div class="post-metadata">

**Author:** ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)\
**Post date:** [June 24, 2021, 10:22am UTC](https://discourse.julialang.org/t/weird-case-of-the-wheres/63491/3 "2021-06-24T10:22:03Z")

</div>

> [@rakeshvar](#):
>
> ```julia
> julia> function f(::f) where f
> f
> end
> f (generic function with 0 methods)
> 
> ```

I’d have expected this to error - the `f` inside of the function is ambigous. Please open an issue on github.
