# \#reflection

**URL:** https://discourse.julialang.org/tag/reflection/1156.md

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

---

## [Introspection for checking an implementation](https://discourse.julialang.org/t/introspection-for-checking-an-implementation/132495)

<div class="topic-metadata">

**Author:** [@Mikhail\_Kagalenko](https://discourse.julialang.org/u/Mikhail_Kagalenko)\
**Replies:** 10\
**Last updated:** [October 11, 2025, 3:25pm UTC](https://discourse.julialang.org/t/introspection-for-checking-an-implementation/132495 "2025-10-11T15:25:20Z")

</div>

I am trying to implement an automated checking procedure for programming assignments. For example, I may ask a user to write function my\_sum() for computing the sum of elements of a vector, then verify that he did not u…

---

## [Val{N} + LinearIndices Causes Massive Compile-Time Unrolling](https://discourse.julialang.org/t/val-n-linearindices-causes-massive-compile-time-unrolling/128248)

<div class="topic-metadata">

**Author:** [@0samuraiE](https://discourse.julialang.org/u/0samuraiE)\
**Replies:** 2\
**Last updated:** [April 20, 2025, 2:47pm UTC](https://discourse.julialang.org/t/val-n-linearindices-causes-massive-compile-time-unrolling/128248 "2025-04-20T14:47:46Z")

</div>

I’m seeing strange behavior when using @code\_warntype on a function that takes a Val{N} parameter and creates a LinearIndices object with size (N, N, N). Here’s a minimal example: function test(::Val{N}) where {N} L…

---

## [Interactively finding files for types and functions directly, in Core and Base](https://discourse.julialang.org/t/interactively-finding-files-for-types-and-functions-directly-in-core-and-base/121099)

<div class="topic-metadata">

**Author:** [@Benny](https://discourse.julialang.org/u/Benny)\
**Replies:** 0\
**Last updated:** [October 9, 2024, 9:44am UTC](https://discourse.julialang.org/t/interactively-finding-files-for-types-and-functions-directly-in-core-and-base/121099 "2024-10-09T09:44:53Z")

</div>

Interactively finding a method’s file with which generally works well, except for Core. Finding where a type or a function is defined however is more indirect by going through the module, and the module definition’s file…

---

## [Getting the parametric constructors from \`methods\`](https://discourse.julialang.org/t/getting-the-parametric-constructors-from-methods/96632)

<div class="topic-metadata">

**Author:** [@CameronBieganek](https://discourse.julialang.org/u/CameronBieganek)\
**Replies:** 2\
**Last updated:** [September 29, 2024, 1:42am UTC](https://discourse.julialang.org/t/getting-the-parametric-constructors-from-methods/96632 "2024-09-29T01:42:58Z")

</div>

If I call methods(Dict), it just returns the “non-parametric constructors”: julia\> methods(Dict) # 5 methods for type constructor: \[1\] Dict() in Base at dict.jl:118 \[2\] Dict(ps::Pair{K, V}...) where {K, V} in Base at di…

---

## [Base.return\_types and \`Test.@inferred\` conditionally failing unlike \`@code\_warntype\`](https://discourse.julialang.org/t/base-return-types-and-test-inferred-conditionally-failing-unlike-code-warntype/114902)

<div class="topic-metadata">

**Author:** [@Benny](https://discourse.julialang.org/u/Benny)\
**Replies:** 6\
**Last updated:** [May 30, 2024, 6:28am UTC](https://discourse.julialang.org/t/base-return-types-and-test-inferred-conditionally-failing-unlike-code-warntype/114902 "2024-05-30T06:28:57Z")

</div>

Experimenting with world age and ran into a weird thing. This is the session that makes sense: julia\> function evalbad(i) ex = :(globali() = $i) eval(ex) # evaluates new global method at runtime …

---

## [Calling a more generic method with Parametric Types](https://discourse.julialang.org/t/calling-a-more-generic-method-with-parametric-types/105537)

<div class="topic-metadata">

**Author:** [@rmellema](https://discourse.julialang.org/u/rmellema)\
**Replies:** 10\
**Last updated:** [October 29, 2023, 7:27pm UTC](https://discourse.julialang.org/t/calling-a-more-generic-method-with-parametric-types/105537 "2023-10-29T19:27:08Z")

</div>

Hey all, For some context, I want to do some work with the Agents.jl package in which I want to try to keep track of the movement of the agents (so I can draw their paths and manipulate them later). The easiest way I th…

---

## [Code associated with \`invoke\`](https://discourse.julialang.org/t/code-associated-with-invoke/100109)

<div class="topic-metadata">

**Author:** [@willtebbutt](https://discourse.julialang.org/u/willtebbutt)\
**Replies:** 4\
**Last updated:** [June 14, 2023, 9:41am UTC](https://discourse.julialang.org/t/code-associated-with-invoke/100109 "2023-06-14T09:41:29Z")

</div>

Is it possible to obtain the code associated with an invoke call? Specifically, if I were to write: sin(5.0) I know that I can get access to one of various representations of the code via code\_lowered, code\_typed, etc…

---

## [Howto resolve a module or a field by its full name](https://discourse.julialang.org/t/howto-resolve-a-module-or-a-field-by-its-full-name/88550)

<div class="topic-metadata">

**Author:** [@o314](https://discourse.julialang.org/u/o314)\
**Replies:** 0\
**Last updated:** [October 11, 2022, 4:24am UTC](https://discourse.julialang.org/t/howto-resolve-a-module-or-a-field-by-its-full-name/88550 "2022-10-11T04:24:24Z")

</div>

Hi, I am looking for a way to resolve a module or a field by its full name I have not found anything in Base (reflection.jl etc.) Is there anything recommended ? more than my own version there : field(qname::Tuple{Sy…
