www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12561] New: typeof function literal doesn't check safe


          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: nobody puremagic.com
          Reporter: code dawg.eu

cat > bug.d << CODE
struct Sunsafe { this(this)  system pure nothrow {} }
pragma(msg, typeof(()  safe { Sunsafe a = Sunsafe.init, b = a; }));

dmd -c bug.d
void function() pure nothrow  safe

As semantic of the function fails the type should be _error_.

Apr 11 2014