Well, a snippet is worth a thousand words: https://run.dlang.io/is/hjvMDO I came across this strange behavior, however I am unsure as to whether this is correct behavior, or just an expected behavior of shadowing. It seems like there should at least be some sort of compiler error/warning for this.