Thread overview
[Issue 17899] Cannot initialise contextless delegate at compile time
Oct 18, 2017
RazvanN
Jan 12, 2018
Nicholas Wilson
Jan 12, 2018
Nicholas Wilson
October 18, 2017
https://issues.dlang.org/show_bug.cgi?id=17899

RazvanN <razvan.nitu1305@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |razvan.nitu1305@gmail.com

--- Comment #1 from RazvanN <razvan.nitu1305@gmail.com> ---
Running the example on git HEAD issues : "Error: non-constant nested delegate literal expression __lambda3" which is pretty cryptic.

--
January 12, 2018
https://issues.dlang.org/show_bug.cgi?id=17899

--- Comment #2 from Nicholas Wilson <iamthewilsonator@hotmail.com> ---
Hmm, it seems this behaviour was added to fix #13259, but that should be legal, i.e. not an error.

--
January 12, 2018
https://issues.dlang.org/show_bug.cgi?id=17899

--- Comment #3 from Nicholas Wilson <iamthewilsonator@hotmail.com> ---
(In reply to RazvanN from comment #1)
> Running the example on git HEAD issues : "Error: non-constant nested delegate literal expression __lambda3" which is pretty cryptic.

Hmm, it seems this behaviour was added to fix issue 13259, but that should be legal, i.e. not an error.

--
January 23, 2018
https://issues.dlang.org/show_bug.cgi?id=17899

--- Comment #4 from github-bugzilla@puremagic.com ---
Commits pushed to master at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/a552d6552d44de9284f03815ecfb32585f0186ac Fix Issue 17899 - Cannot initialise contextless delegate at compile time

Also revert test case for 13259 - there is no reason that initialised module scope delegates should be illegal.

https://github.com/dlang/dmd/commit/8476f8bb4e59e92ed8b01bcd7513066aae172139 Merge pull request #7704 from thewilsonator/patch-2

Fix Issue 17899: Allow delegate initialisation at module scope

--
January 23, 2018
https://issues.dlang.org/show_bug.cgi?id=17899

github-bugzilla@puremagic.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--