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
Comment #1 by code — 2016-10-24T22:56:38Z
Comment #2 by github-bugzilla — 2016-10-30T22:11:02Z
Commit pushed to stable at https://github.com/dlang/dlang.org https://github.com/dlang/dlang.org/commit/7888921913009becd68bd70195a073b4e051f17d changelog entry for ignored scope on value params - see https://github.com/dlang/dmd/pull/5897 - fixes Issue 16629
Comment #3 by github-bugzilla — 2016-10-31T01:04:38Z
Commit pushed to master at https://github.com/dlang/dlang.org https://github.com/dlang/dlang.org/commit/7888921913009becd68bd70195a073b4e051f17d changelog entry for ignored scope on value params