Bug 17192 – ParameterDefaults fails when parameter is called "i"
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2017-02-17T01:25:54Z
Last change time
2018-01-05T13:30:59Z
Keywords
pull
Assigned to
ag0aep6g
Creator
John Colvin
Comments
Comment #0 by john.loughran.colvin — 2017-02-17T01:25:54Z
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