http://d.puremagic.com/issues/show_bug.cgi?id=3809
--- Comment #4 from Don <[email protected]> 2010-05-31 11:46:37 PDT --- This isn't really a regression. Struct static initializers have always been CTFEd, for example the code below generates a compile-time div-by-zero error even in DMD 1.023. The only reason this code ever worked was that CTFE didn't work for member functions. Starting with svn 337 (DMD1.056), member functions can be called at compile time. However, the spec says: "The static initializer syntax can also be used to initialize non-static variables, provided that the member names are not given. The initializer need not be evaluatable at compile time." The compiler has never complied with this part of the spec. // Should compile, but fails int bug3809() { asm { nop; } return 0; } struct BUG3809 { int xx; } void bug3809b() { BUG3809 b = { bug3809() }; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
