[Issue 7051] New: Class member with un- at safe destructor gives confusing error

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Dec 2 09:31:43 PST 2011


http://d.puremagic.com/issues/show_bug.cgi?id=7051

           Summary: Class member with un- at safe destructor gives confusing
                    error
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: code at klickverbot.at


--- Comment #0 from klickverbot <code at klickverbot.at> 2011-12-02 09:30:38 PST ---
Consider:
---
struct Foo {
  ~this() {}
}

@safe {
  class Bar {
    Foo f;
  }
}
---

DMD 2.057 Git (887dda0ba) fails with:
---
Error: safe function '~this' cannot call system function '~this'
---

I didn't think about what the best solution for this yet (what exactly is a
»safe class« in the first place?), but the error message should certainly be
improved.

[related to issue 7050]

-- 
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