On Saturday, 15 April 2023 at 12:45:31 UTC, Richard (Rikki) Andrew Cattermole wrote:
It was bad analysis by the compiler, which has since been corrected.

It should have been applied only to @safe code.

But why is the @unsafe programmer now left unprotected in cases like this

```
ref int foo (ref int i)
//           `------- automatically insert `return` here?
{
   return i;
}
```

where the compiler recognizes that the function returns a ref parameter?

Under which circumstances is it a mistake to insert the `return` at the indicated position? If there are none why can't it be done implicitly (automatically)?
  • Returning a refe... Chris Katko via Digitalmars-d-learn
    • Re: Returni... IchorDev via Digitalmars-d-learn
    • Re: Returni... Paul Backus via Digitalmars-d-learn
    • Re: Returni... Jacob Shtokolov via Digitalmars-d-learn
      • Re: Ret... kdevel via Digitalmars-d-learn
        • Re:... Bastiaan Veelo via Digitalmars-d-learn
          • ... kdevel via Digitalmars-d-learn
            • ... Dennis via Digitalmars-d-learn
              • ... kdevel via Digitalmars-d-learn
                • ... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
                • ... kdevel via Digitalmars-d-learn
                • ... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
                • ... kdevel via Digitalmars-d-learn
                • ... Dennis via Digitalmars-d-learn
                • ... Dennis via Digitalmars-d-learn
                • ... kdevel via Digitalmars-d-learn
                • ... Dennis via Digitalmars-d-learn
                • ... kdevel via Digitalmars-d-learn
                • ... Dennis via Digitalmars-d-learn

Reply via email to