wrongly infers @safe
for accessing overlapping pointer fields in unions
https://github.com/dlang/dmd/commit/976e82f990fa9852894d0d6d3ac496129543c930
Merge pull request #7982 from WalterBright/fix17284
fix Issue 17284 - Template function attribute inference wrongly infer…
merged-on-behalf-of: Walter
https://issues.dlang.org/show_bug.cgi?id=17284
github-bugzi...@puremagic.com changed:
What|Removed |Added
Status|NEW |RESOLVED
https://issues.dlang.org/show_bug.cgi?id=17284
Walter Bright changed:
What|Removed |Added
CC|
https://issues.dlang.org/show_bug.cgi?id=17284
Carsten Blüggel changed:
What|Removed |Added
CC||chi...@posteo.net
--
https://issues.dlang.org/show_bug.cgi?id=17284
--- Comment #6 from ZombineDev ---
> Looks like attribute inference is a free license to violate @safety. :-D
Yeah with templates one enters 'god mode' in :D
Though the situation isn't very clear-cut. Take this code for
https://issues.dlang.org/show_bug.cgi?id=17284
--- Comment #5 from hst...@quickfur.ath.cx ---
Oh my, it gets worse: ref has nothing to do with it at all! Look at this
blatant violation of @safe:
--
class C { }
union U { C c; int i; }
void func(T)(T t)
{
t.c = new C;
https://issues.dlang.org/show_bug.cgi?id=17284
hst...@quickfur.ath.cx changed:
What|Removed |Added
Summary|ref returning function |Template function attribute