https://issues.dlang.org/show_bug.cgi?id=9051
RazvanN <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |[email protected] Resolution|--- |WONTFIX --- Comment #4 from RazvanN <[email protected]> --- The postblit should not be used as it has impossible to fix flaws. Development for it has halted. The code works if the copy constructor is used: struct Set{ uint[] arr; this(const ref Set) {} //comment out to make it compile } pure auto getMeASet(uint[] arr) { return Set(arr); } immutable set = getMeASet([1,2,3,4]); pure auto getSecond(in Set set) { return set.arr[1]; } pragma(msg, getSecond(set)); I'm gonna close this as WONTFIX. --
