https://issues.dlang.org/show_bug.cgi?id=17067
RazvanN <razvan.nitu1...@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |razvan.nitu1...@gmail.com --- Comment #1 from RazvanN <razvan.nitu1...@gmail.com> --- This is probably a WONTFIX since the header generation is done immediately after the parsing phase so at that point no symbol resolution is done to see which symbols come from which imports and the safe thing to do is to just put them there; a workaround for this is to use scoped imports : import std.stdio; class Foo { void bar() { import std.stdio : writeln; writeln("Hello world!"); } } --