# What exactly is the meaning of \`\`\`!Matched\`\`\` in \`\`\`myFunction(::G,!Matched::M)\`\`\`?

**URL:** <https://discourse.julialang.org/t/what-exactly-is-the-meaning-of-matched-in-myfunction-g-matched-m/20145>\
**Category:** General Usage\
**Created:** [January 27, 2019, 12:05pm UTC](https://discourse.julialang.org/t/what-exactly-is-the-meaning-of-matched-in-myfunction-g-matched-m/20145 "2019-01-27T12:05:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bsnyh](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@bsnyh](https://discourse.julialang.org/u/bsnyh)\
**Post date:** [January 27, 2019, 12:05pm UTC](https://discourse.julialang.org/t/what-exactly-is-the-meaning-of-matched-in-myfunction-g-matched-m/20145/1 "2019-01-27T12:05:07Z")

</div>

```julia
MethodError: no method matching cG(::G, ::typeof(m))
Closest candidates are:
  cG(::G, !Matched::M) at /home/devel/Desktop/SDP_me/g.jl:77
#initSim#155(::Bool, ::Bool, ::Bool, ::Bool, ::Function, ::String) at run_c.jl:139
(::getfield(J, Symbol("#kw##initSim")))(::NamedTuple{(:doPrint,),Tuple{Bool}}, ::typeof(initSim), ::String) at none:0
top-level scope at none:0

```

I indeed have the function `cG` safe and sound. Why can not julia find it?

---

<div class="post-metadata">

**Author:** ![dpsanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dpsanders/32/3573_2.png) [@dpsanders](https://discourse.julialang.org/u/dpsanders)\
**Post date:** [January 27, 2019, 1:17pm UTC](https://discourse.julialang.org/t/what-exactly-is-the-meaning-of-matched-in-myfunction-g-matched-m/20145/2 "2019-01-27T13:17:44Z")

</div>

Please post the code that you are using to call the function, as well as the function itself, to give a MWE (minimum working example).

In this case, it seems that the function has a method that expects to be called with a second argument that is the function m, but the way you called it did not correctly “match” that.

---

<div class="post-metadata">

**Author:** ![chakravala](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chakravala/32/6832_2.png) [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Post date:** [January 27, 2019, 1:23pm UTC](https://discourse.julialang.org/t/what-exactly-is-the-meaning-of-matched-in-myfunction-g-matched-m/20145/3 "2019-01-27T13:23:10Z")

</div>

Julia found it in `g.jl` on line 77. You might need to change a type assertion.

---

<div class="post-metadata">

**Author:** ![Keno](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/keno/32/285_2.png) [@Keno](https://discourse.julialang.org/u/Keno)\
**Post date:** [January 28, 2019, 9:14pm UTC](https://discourse.julialang.org/t/what-exactly-is-the-meaning-of-matched-in-myfunction-g-matched-m/20145/4 "2019-01-28T21:14:18Z")

</div>

There’s a method, `cg(::G, ::M)`, but you tried to call `cg(::G, ::typeof(m))` and !`typeof(m) <: M`. My best guess it you have a method called `m(...)`, but are also trying to use it as a variable of type `M` that you then forgot to assign. For more specific help you’ll need to post the code though.
