www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16629] New: [Reg 2.072] scope is stripped from some parameters


          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 puremagic.com
          Reporter: code 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] ==
static assert(ParameterStorageClassTuple!(T.method2)[0] ==
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 ==
Should at least be part of the changelog.


Oct 20 2016