[Issue 7321] New: returning void considered unsafe by safety inference
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jan 19 09:51:52 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7321
Summary: returning void considered unsafe by safety inference
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: timon.gehr at gmx.ch
--- Comment #0 from timon.gehr at gmx.ch 2012-01-19 09:51:50 PST ---
In the following code, the second delegate literal is incorrectly inferred as
unsafe:
static assert(is(typeof((){})==void function()pure nothrow @safe)); // ok
static assert(is(typeof((){return;})==void function()pure nothrow @safe));//
fail
Error: static assert (is(void function() pure nothrow == void function() pure
nothrow @safe)) is false
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list