D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 10604 - Not consistent access check for overloaded symbols
Summary: Not consistent access check for overloaded symbols
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P3 normal
Assignee: No Owner
URL:
Keywords: accepts-invalid, rejects-valid
Depends on:
Blocks:
 
Reported: 2013-07-10 19:08 UTC by Kenji Hara
Modified: 2024-12-13 18:09 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Kenji Hara 2013-07-10 19:08:40 UTC
Test case:

moduel a;
version(A)
{
    private template X(T) { enum X = 1; }
    public  template X(size_t n) { enum X = 2; }

    private void foo(int) {}
    public  void foo(string) {}
}
version(B)
{
    public  template X(size_t n) { enum X = 2; }
    private template X(T) { enum X = 1; }

    public  void foo(string) {}
    private void foo(int) {}
}

module b;
import a;
void main()
{
                        // version=A    B
    auto x1 = X!int;    //  Error       OK
    auto x2 = X!100;    //  Error       OK

    foo(100);           //  Error       Error
    foo("a");           //  Error       OK
}
Comment 1 github-bugzilla 2014-03-15 16:49:27 UTC
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/5b7e797b67d760fad05a84f739217d0de830026e
Add "FIXME" comment for issue 10604 in ScopeDsymbol::search
Comment 2 dlangBugzillaToGithub 2024-12-13 18:09:09 UTC
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dmd/issues/18627

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB