[Issue 17192] New: ParameterDefaults fails for member function

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Feb 16 17:25:54 PST 2017


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

          Issue ID: 17192
           Summary: ParameterDefaults fails for member function
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: john.loughran.colvin at gmail.com

import std.traits;

struct Base
{
    void foo(int i) {}
}

alias blah = ParameterDefaults!(Base.foo);

std/traits.d(1227): Error: variable i cannot be read at compile time
std/traits.d(1228): Error: variable i cannot be read at compile time
std/traits.d(1252): Error: template instance
std.traits.ParameterDefaults!(foo).Get!0LU error instantiating
std/traits.d(1255):        instantiated from here: Impl!0LU
test.d(8):        instantiated from here: ParameterDefaults!(foo)

bisection isn't totally certain yet, but I'm 90% sure it was caused by this:
https://github.com/dlang/phobos/pull/4889/commits/f783d975a28febea3a323bae3ce5f902cec17aa9

--


More information about the Digitalmars-d-bugs mailing list