https://issues.dlang.org/show_bug.cgi?id=24003
Ate Eskola <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #3 from Ate Eskola <[email protected]> --- I think this is same as what I was just about to report: ```d auto nullPtr(int*) => (int*).init; @safe unittest { int local; // compiles (with -preview=dip1000), because the parameter is correctly inferred as scope auto nullP = nullPtr(&local); } // Yet this says AliasSeq!(). // Should say AliasSeq!"scope". pragma(msg, __traits(getParameterStorageClasses, nullPtr, 0)); ``` I was solving https://issues.dlang.org/show_bug.cgi?id=23300, but this bug is blocking me. Since `scope` inference is limited, `std.array.array` needs to manually introspect whether `.front` / `.opApply` / element copy of the source range are `scope`. With this bug, it only works in the rare few cases where `scope` is manually specified. I have tried working around it by testing whether a call passing a `scope` argument compiles, but no joy. DIP1000 checks are only done in safe code, and trying to cast a `@system` function to a `@trusted` one to make the check work, without changing the function type in any other way or losing the `scope` inference, was just too difficult for me - probably impossible. --
