https://issues.dlang.org/show_bug.cgi?id=17559
--- Comment #4 from Rainer Schuetze <[email protected]> --- You get the same result without default parameters, too: ///////////// test.d ///////////// import mod; void main() { fun(1, 10); fun(2, 10); fun(3, 10); fun(4, 10); } ////////////// mod.d ///////////// void fun(int n, int defParam) { assert(n != 4); } ////////////////////////////////// The problem seems to be that the backend always performs common sub expression elimination, mapping all instances of "10" to the same expression instance and then emitting its location. I suspect this exists since forever, but I haven't tried older versions yet. --
