# \#specializations

**URL:** https://discourse.julialang.org/tag/specializations/1774.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [How to combine @nospecialize with type parameters?](https://discourse.julialang.org/t/how-to-combine-nospecialize-with-type-parameters/137304)

<div class="topic-metadata">

**Author:** [@matthias314](https://discourse.julialang.org/u/matthias314)\
**Replies:** 6\
**Last updated:** [May 28, 2026, 11:29am UTC](https://discourse.julialang.org/t/how-to-combine-nospecialize-with-type-parameters/137304 "2026-05-28T11:29:20Z")

</div>

It seems that type parameters in functions prevent @nospecialize from having an effect: julia\> f(@nospecialize x::T) where T = 0; julia\> f(1); f(1.0); julia\> m = only(methods(f)); m.specializations |\> collect 7-elemen…

---

## [\`methods\` and \`@which\` give different results](https://discourse.julialang.org/t/methods-and-which-give-different-results/127954)

<div class="topic-metadata">

**Author:** [@sadish-d](https://discourse.julialang.org/u/sadish-d)\
**Replies:** 7\
**Last updated:** [April 11, 2025, 5:46pm UTC](https://discourse.julialang.org/t/methods-and-which-give-different-results/127954 "2025-04-11T17:46:29Z")

</div>

I have: f(; x) = 0 and I do: f(x = 1) creating one specialized method (MethodInstance?) of f. I can see the specialized method with a @which: julia\> (@which f(x = 1)) |\> Base.specializations Base.MethodSpecializati…
