# Question about scoping inside a function

**URL:** <https://discourse.julialang.org/t/question-about-scoping-inside-a-function/709>\
**Category:** General Usage\
**Created:** [December 3, 2016, 1:07pm UTC](https://discourse.julialang.org/t/question-about-scoping-inside-a-function/709 "2016-12-03T13:07:42Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [December 5, 2016, 7:47am UTC](https://discourse.julialang.org/t/question-about-scoping-inside-a-function/709/12 "2016-12-05T07:47:16Z")

</div>

I don’t see what is different with what I am trying to do and the following:

```nohighlight
function f()
    g(x::Int) = println("Here 1")
    g(x::Float64) = println("Here 2")
    g(1)
    g(2.0)
end

```

```julia
julia> f()
Here 1
Here 2

```

---

_[View the full topic](https://discourse.julialang.org/t/question-about-scoping-inside-a-function/709)._
