https://issues.dlang.org/show_bug.cgi?id=16629
Issue ID: 16629
Summary: [Reg 2.072] scope is stripped from some parameters
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: regression
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
cat > bug.d << CODE
import std.traits;
struct T
{
void method1(scope int* foo){}
void method2(scope int foo){}
}
static assert(ParameterStorageClassTuple!(T.method1)[0] ==
ParameterStorageClass.scope_);
static assert(ParameterStorageClassTuple!(T.method2)[0] ==
ParameterStorageClass.scope_);
CODE
dmd -c bug
----
bug.d(10): Error: static assert (0u == cast(ParameterStorageClass)1u) is false
----
The scope storage class is ignored for some parameters (value parameters) and
no longer present in the tuple returned by `is(typeof(func) PR ==
__parameters)`.
Should at least be part of the changelog.
https://github.com/dlang/dmd/pull/5897
--