[Issue 16629] New: [Reg 2.072] scope is stripped from some parameters
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Oct 20 06:27:41 PDT 2016
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: nobody at puremagic.com
Reporter: code at dawg.eu
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
--
More information about the Digitalmars-d-bugs
mailing list