simple DIP1000 test fails?

Jonathan M Davis newsgroup.d at jmdavisprog.com
Thu Nov 2 20:03:52 UTC 2017


On Thursday, November 02, 2017 19:53:36 Q. Schroll via Digitalmars-d-learn 
wrote:
> struct S { ref S id() return { return this; } }
> void main() { S* p = &S().id(); }

Well, if you make them @safe, it won't compile whether -dip1000 is used or
not. At the moment, I don't recall whether -dip1000's effects are supposed
to be limited to @safe code or not though. If they are, then I don't think
that there's a bug, but if they aren't, then it looks like there is.

- Jonathan M Davis



More information about the Digitalmars-d-learn mailing list