https://issues.dlang.org/show_bug.cgi?id=13848
Kenji Hara <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #1 from Kenji Hara <[email protected]> --- (In reply to deadalnix from comment #0) > auto fun() { > return SS(a, p); > } Your're trying to initialize SS.a by the value a. and SS.r by using p. Of course SS.a and SS.r are overlapped each other, so initializing the two fields at the same time is invalid. In this case, you cannot use literal style syntax to construct SS. An alternative way is: auto fun() { SS ss = {a:a, p:p}; // use StructInitializer syntax return ss; } --
