Bug 16629 – [Reg 2.072] scope is stripped from some parameters
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-10-20T13:27:00Z
Last change time
2016-10-31T01:04:38Z
Keywords
pull
Assigned to
nobody
Creator
code
Comments
Comment #0 by code — 2016-10-20T13:27:41Z
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