https://issues.dlang.org/show_bug.cgi?id=18644
Jonathan M Davis <issues.dl...@jmdavisprog.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |issues.dl...@jmdavisprog.co | |m --- Comment #1 from Jonathan M Davis <issues.dl...@jmdavisprog.com> --- Shouldn't the error be that int* foo() { return &i; } is trying to convert scope int* to int* in @safe code? Unless foo isn't inferred as @safe in spite of it being declared in an @safe function, but if that's the case, then calling foo should be an error, since otherwise, an @safe function would be calling an @system function without @trusted being involved. Certainly, given the fact that foo() returns int*, I don't see how int*[] b = [foo()]; // should detect error is invalid. It's only dealing with int*. So, there's no escaping as far is that bit of code is concerned. --