https://issues.dlang.org/show_bug.cgi?id=15567 --- Comment #1 from Byron Heads <bheads at moxiegroup.com> --- The implicit locals should not hijack globals import std.experimental.logger; void foo() { import std.net.curl; trace("hello"); } void main() { foo(); } --