Program: module huh; import huh; compiles alright. However the same thing in a bigger project cased spurious forward references around std.conv.text. (Sorry failed to reduce.) Shouldn't compiler just statically disallow self-importing ?
Phobos has a couple of these self-imports. They all seem to be in unittest blocks, which maybe makes copy-pasting samples to outside modules easier since you automatically get a free import statement included. Maybe we should allow them in function/unittest scope, and disallow them in module scope. Or should we just ban them outright? I'm running a test suite on a fix right now.
Going to close it for a moment as the codebase changed radically over time and I'm not 100% sure self-importing was the core cause.