www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16582] New: [REG2.072.0-b1] ParamterDefaultValueTuple fails

https://issues.dlang.org/show_bug.cgi?id=16582

          Issue ID: 16582
           Summary: [REG2.072.0-b1] ParamterDefaultValueTuple fails to
                    compile for scope paramters
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: sludwig outerproduct.org

---
import std.traits;
class C {}
void foo(scope C bar = null) {}
static assert(ParameterDefaultValueTuple!foo[0] == null);
---

For DMD 2.072.0-b1, results in:

.../src/phobos/std/traits.d-mixin-1211(1211): Error: scope variable bar may not
be returned

Works correctly up to 2.071.2

--
Oct 03 2016