module main; import std.stdio; struct A {} static A a; void main() { writeln(main.a); } this code does not work, because it try to use main function instead of main module. Even error message is wierd: Error: struct A does not overload ()