https://issues.dlang.org/show_bug.cgi?id=12561
Issue ID: 12561
Summary: typeof function literal doesn't check @safe
Product: D
Version: unspecified
Hardware: x86_64
OS: Linux
Status: NEW
Severity: enhancement
Priority: P1
Component: DMD
Assignee: [email protected]
Reporter: [email protected]
cat > bug.d << CODE
struct Sunsafe { this(this) @system pure nothrow {} }
pragma(msg, typeof(() @safe { Sunsafe a = Sunsafe.init, b = a; }));
CODE
dmd -c bug.d
----
void function() pure nothrow @safe
----
As semantic of the function fails the type should be _error_.
--