D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6762 - Template parameter declaration does name lookup
Summary: Template parameter declaration does name lookup
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL:
Keywords: rejects-valid
Depends on:
Blocks:
 
Reported: 2011-10-03 15:07 UTC by Peter Alexander
Modified: 2014-11-06 01:34 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Peter Alexander 2011-10-03 15:07:40 UTC
--------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 hsteoh 2014-11-06 01:34:56 UTC
Tested on git HEAD, Linux/64. Can't reproduce problem anymore. I guess it has been fixed since?