Thread overview
[Issue 13945] Documentation and errors of nested structs need improvement
Jun 04, 2015
Ali Cehreli
Jul 02, 2017
Vladimir Panteleev
Dec 17, 2022
Iain Buclaw
June 04, 2015
https://issues.dlang.org/show_bug.cgi?id=13945

Ali Cehreli <acehreli@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |acehreli@yahoo.com

--- Comment #1 from Ali Cehreli <acehreli@yahoo.com> ---
Found another example that does not involve a nested struct:

import std.algorithm;

struct Foo(R)
{
    R r;

    this(R r)    // <-- Compilation error
    {}
}

auto foo(R)(R r)
{
    return Foo!R(r);
}

void main()
{
    [1].map!(i => i).foo;
}

Error: field r must be initialized in constructor, because it is nested struct

Ali

--
July 02, 2017
https://issues.dlang.org/show_bug.cgi?id=13945

Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |spec

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=13945

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P2

--
December 15
https://issues.dlang.org/show_bug.cgi?id=13945

--- Comment #2 from dlangBugzillaToGithub <robert.schadek@posteo.de> ---
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dlang.org/issues/3942

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB

--