digitalmars.D - DIP-1000 scope analysis doesn't kick in for small-size-optimized
- Per =?UTF-8?B?Tm9yZGzDtnc=?= (10/10) Apr 19 2018 I'm now satisfied with my SSOString at
- Per =?UTF-8?B?Tm9yZGzDtnc=?= (2/5) Apr 19 2018 Note that qualifying `opSlice` as `inout` doesn't help.
- Radu (5/15) Apr 19 2018 Removing `scope` from the function prototype will work. See
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?
Apr 19 2018
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#L219Note that qualifying `opSlice` as `inout` doesn't help.
Apr 19 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.
Apr 19 2018