DIP-1000 scope analysis doesn't kick in for small-size-optimized GC-string

Radu void at null.pt
Fri Apr 20 05:44:15 UTC 2018


On Thursday, 19 April 2018 at 17:36:19 UTC, Per Nordlöw wrote:
> I'm now satisfied with my SSOString at
>
> https://github.com/nordlow/phobos-next/blob/master/src/sso_string.d
>
> However, I'm having problems within making lifetime analysis 
> via scope kick in. For instance, the function `f` at
>
> https://github.com/nordlow/phobos-next/blob/master/src/sso_string.d#L219
>
> shouldn't compile, but it does.
>
> Have I missed something or is this yet another corner-case that 
> requires a new bugzilla issue?
>
> Walter?
>
> Andrei?

Removing `scope` from the function prototype will work. See 
https://run.dlang.io/is/BIYSY4

I think it is a bug, but might be wrong as dip1000 spec is not 
up2date.


More information about the Digitalmars-d mailing list