Thread overview | |||||
---|---|---|---|---|---|
|
April 19, 2018 DIP-1000 scope analysis doesn't kick in for small-size-optimized GC-string | ||||
---|---|---|---|---|
| ||||
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? |
April 19, 2018 Re: DIP-1000 scope analysis doesn't kick in for small-size-optimized GC-string | ||||
---|---|---|---|---|
| ||||
Posted in reply to Per Nordlöw | On Thursday, 19 April 2018 at 17:36:19 UTC, Per Nordlöw wrote:
> 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
Note that qualifying `opSlice` as `inout` doesn't help.
|
April 20, 2018 Re: DIP-1000 scope analysis doesn't kick in for small-size-optimized GC-string | ||||
---|---|---|---|---|
| ||||
Posted in reply to Per Nordlöw | 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. |
Copyright © 1999-2021 by the D Language Foundation