Understanding DIP 1000 semantics -- Where's the bug?
Sebastiaan Koppe
mail at skoppe.eu
Sun Sep 22 07:04:14 UTC 2019
On Sunday, 22 September 2019 at 02:52:17 UTC, Suleyman wrote:
> On Sunday, 22 September 2019 at 02:29:49 UTC, Mike Franklin
> wrote:
>> Possibility 1:
>> Exhibit A should not emit an error
>
> This looks like the right answer. I don't see any local
> reference escaping in the entire program.
When calling a function the compiler only looks at the function
signature.
You can never pass a scope int* to a function accepting int*,
regardless of whether the body of the function escapes it.
More information about the Digitalmars-d
mailing list