https://issues.dlang.org/show_bug.cgi?id=23032
Issue ID: 23032 Summary: passing nested structs to struct templates which make them static should be a warning Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nob...@puremagic.com Reporter: crazymonk...@gmail.com ```d import std; struct framelaundering(FRAME){ static FRAME main; ref i(){return main.j;} } void main(){ int i; struct here{ ref j(){return i;} } framelaundering!here foo; foo.i++; i.writeln; } ``` causes a runtime crash; whats happening to the otherwise magic static keyword was extremely unclear to me. Id suggest a warning "here from main.here has a context pointer, when its used in framelaundering!here.main is initialed without it because its static" or sometin --