[Issue 7826] [D2 Beta] Cannot use getHash in toHash without a warning

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Apr 6 00:48:51 PDT 2012


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


Jonathan M Davis <jmdavisProg at gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jmdavisProg at gmx.com


--- Comment #3 from Jonathan M Davis <jmdavisProg at gmx.com> 2012-04-06 00:49:29 PDT ---
I believe that tohash is among the functions which were decided must be @safe
const pure nothrow on classes. So, in that case, I would expect it to be
required (though not until Object is appropriately const-correct and whatnot).
But I don't see why @safe, const, pure, or nothrow should be required for
structs, since no inheritance is involved. With classes, with have to pick what
we want and use that for everything (possibly with some overloads which don't
have quite the same list of attributes), but structs don't have the same
requirements/restrictions.

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