In Macros - Crystal I read

It is possible to access the top-level namespace, as a TypeNode, with a special variable: @top_level.

but the provided example does not work.

I only found this.

Am I missing something? Is @top_level a thing?

It’s a thing but it hasn’t been released yet. It’ll be included as part of Crystal 1.1.0.