[Issue 16095] a delegate can mutate immutable data
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Jul 27 15:41:28 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=16095
hbaelx at hotmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hbaelx at hotmail.com
--- Comment #1 from hbaelx at hotmail.com ---
It doesn't only break immutability, but also TLS:
struct Foo
{
void ping() shared {}
}
void main()
{
Foo a;
// a.ping(); // rejected
(&a.ping)(); // accepted
}
I really hope someone fixes this soon enough. This is a major flaw.
--
More information about the Digitalmars-d-bugs
mailing list