# Confused by behaviour of nested functions

**URL:** <https://discourse.julialang.org/t/confused-by-behaviour-of-nested-functions/20576>\
**Category:** New to Julia\
**Created:** [February 8, 2019, 10:52am UTC](https://discourse.julialang.org/t/confused-by-behaviour-of-nested-functions/20576 "2019-02-08T10:52:35Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [February 8, 2019, 10:55am UTC](https://discourse.julialang.org/t/confused-by-behaviour-of-nested-functions/20576/2 "2019-02-08T10:55:28Z")

</div>

Don’t define functions conditionally inside other functions: [disallow methods of local functions in different blocks · Issue #15602 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/issues/15602).

---

_[View the full topic](https://discourse.julialang.org/t/confused-by-behaviour-of-nested-functions/20576)._
