On 13/10/2024 3:12 AM, Salih Dincer wrote:
    You are not wrong, when it is a struct, it is being heap allocated.

    Looks like the optimization for classes, hasn't been applied to structs.

    https://issues.dlang.org/show_bug.cgi?id=24806 <https://
    issues.dlang.org/show_bug.cgi?id=24806>

So if |scope| is a facility for classes, it should give an error when used in structures. Is that so? I understand this from the issue you opened.

``scope`` offers protection from escaping.

It is functioning correctly.

The problem is an optimization you want, isn't being applied by the frontend, but is elsewhere.
  • Scope & Stru... Salih Dincer via Digitalmars-d-learn
    • Re: Scope &... Salih Dincer via Digitalmars-d-learn
      • Re: Sco... Nick Treleaven via Digitalmars-d-learn
        • Re:... Salih Dincer via Digitalmars-d-learn
          • ... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
    • Re: Scope &... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
      • Re: Sco... Salih Dincer via Digitalmars-d-learn
        • Re:... Nick Treleaven via Digitalmars-d-learn
        • Re:... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
          • ... Salih Dincer via Digitalmars-d-learn

Reply via email to