https://issues.dlang.org/show_bug.cgi?id=13084 --- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> --- It is intentional to change all ModuleInfo objects immutable. https://github.com/D-Programming-Language/druntime/pull/790 --