https://issues.dlang.org/show_bug.cgi?id=17140 --- Comment #1 from Chris Wright <dhasenan at gmail.com> --- Doesn't have to be a static import: --- fun.S fun() { import std.socket; alias S = Socket; return null; } --- --