[Issue 16582] New: [REG2.072.0-b1] ParamterDefaultValueTuple fails to compile for scope paramters

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Oct 3 10:11:30 PDT 2016


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 at puremagic.com
          Reporter: sludwig at 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

--


More information about the Digitalmars-d-bugs mailing list