Bug 6762 – Template parameter declaration does name lookup
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2011-10-03T15:07:00Z
Last change time
2014-11-06T01:34:56Z
Keywords
rejects-valid
Assigned to
nobody
Creator
peter.alexander.au
Comments
Comment #0 by peter.alexander.au — 2011-10-03T15:07:40Z
--------foo.d----------
private int X;
--------bar.d----------
import foo;
int bar(int X)() // error: foo.X is private
{
return 0;
}
int main()
{
return bar!(0)();
}
----------------------
It happens for template type parameters as well, but you don't notice it due to bug 2830.
Comment #1 by hsteoh — 2014-11-06T01:34:56Z
Tested on git HEAD, Linux/64. Can't reproduce problem anymore. I guess it has been fixed since?