[Issue 8275] New: DMD assumes that Object.toHash() overrides are @safe, even though base is @trusted
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jun 20 19:34:50 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8275
Summary: DMD assumes that Object.toHash() overrides are @safe,
even though base is @trusted
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: minor
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: alex at lycus.org
--- Comment #0 from Alex Rønne Petersen <alex at lycus.org> 2012-06-21 04:37:10 CEST ---
class A
{
override hash_t toHash() pure nothrow const
{
return *cast(hash_t*)&main;
}
}
void main()
{
}
test.d(5): Error: cast from void function() to uint* not allowed in safe code
--
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