Bug 12511 – static overloaded function is not accessible

Status
REOPENED
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-04-03T01:05:34Z
Last change time
2024-12-13T18:19:07Z
Assigned to
No Owner
Creator
Domain
Moved to GitHub: dmd#18808 →

Comments

Comment #0 by do.main — 2014-04-03T01:05:34Z
module A; public class A { private static void foo() {} public static void foo(int) {} } module B; import A; public class B { public static void bar() { A.foo(0); } } Error: class A.A member foo is not accessible
Comment #1 by razvan.nitu1305 — 2018-01-25T14:16:28Z
Comment #2 by github-bugzilla — 2018-01-28T05:57:51Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/0278c5138a2b9d6329b20d58e2164f13556bcda7 Fix Issue 12511 - static overloaded function is not accessible https://github.com/dlang/dmd/commit/1928320aef174f3a4eaecc375b8ed650049084d9 Added link to issue 12511 https://github.com/dlang/dmd/commit/1b0890a76b5bc6d3c994be31ed6b8c410916b4ca Merge pull request #7773 from RazvanN7/Issue_12511 Fix Issue 12511 - static overloaded function is not accessible merged-on-behalf-of: Mike Franklin <[email protected]>
Comment #3 by razvan.nitu1305 — 2018-02-22T13:55:13Z
*** Issue 13697 has been marked as a duplicate of this issue. ***
Comment #4 by do.main — 2018-04-03T02:42:58Z
Still has problem: class A { private static void foo(int i, int j) { } public static void foo(int i) { A.foo(i, 0); } } Error: function test.A.foo(int i) is not callable using argument types (int, int) But change A.foo(1, 0) to foo(i, 0) passed.
Comment #5 by default_357-line — 2018-06-06T07:09:08Z
This PR has created a new problem. test/Foo.d: module test.Foo; class Foo { package static void foo(Object) { } public static void foo() { } } test/test.d: module test.test; import test.Foo; void fun() { Foo.foo(new Object); } Expected: a call to foo Outcome: test/test.d(7): Error: function test.Foo.Foo.foo() is not callable using argument types (Object) Bisect points at the PR.
Comment #6 by default_357-line — 2018-06-06T09:19:37Z
Comment #7 by robert.schadek — 2024-12-13T18:19:07Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18808 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB