# Multiple Dispatch Across Seperate Files

**URL:** <https://discourse.julialang.org/t/multiple-dispatch-across-seperate-files/52480>\
**Category:** General Usage\
**Created:** [December 27, 2020, 10:26pm UTC](https://discourse.julialang.org/t/multiple-dispatch-across-seperate-files/52480 "2020-12-27T22:26:21Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![rdeits](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdeits/32/286_2.png) [@rdeits](https://discourse.julialang.org/u/rdeits)\
**Post date:** [December 28, 2020, 5:01am UTC](https://discourse.julialang.org/t/multiple-dispatch-across-seperate-files/52480/7 "2020-12-28T05:01:59Z")

</div>

> [@Kieran\_Gill](#):
>
> What is the correct way to set up function overloading from multiple different files?

The problem in your case is that you’ve now included `NNFS.jl` in two different places–once inside `Layers.jl` and again in your main file. Those separate `include()s` have created two completely unrelated modules which happen to have the same name. That’s why it’s important _not_ to include the same file multiple times. Here’s a post with a similar question on avoiding multiple includes that you might find helpful: [Need to include one file multiple times, how to avoid warning - #5 by rdeits](https://discourse.julialang.org/t/need-to-include-one-file-multiple-times-how-to-avoid-warning/27439/5)

In your case, you should be able to replace:

```julia
include("NNFS.jl")
import .NNFS: forward

```

with

```julia
import ..NNFS: forward

```

in `Layers.jl`

---

_[View the full topic](https://discourse.julialang.org/t/multiple-dispatch-across-seperate-files/52480)._
