Bug 660 – [D1] Incorrect protection error message

Status
RESOLVED
Resolution
WONTFIX
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
All
OS
All
Creation time
2006-12-06T16:42:45Z
Last change time
2019-05-11T16:28:16Z
Keywords
rejects-valid
Assigned to
Walter Bright
Creator
Carlos Santander

Comments

Comment #0 by casantander1 — 2006-12-06T16:42:45Z
(sorry for not finding a better summary) //------------------- class A { void foo () {} private static void foo (int i) {} } class B { void foo (int x) { A.foo (x); } } //------------------- $ gdmd -c test1.d test1.d:12: class test1.B member foo is not accessible //-------------------
Comment #1 by thomas-dloop — 2007-02-27T18:38:03Z
Comment #2 by clugdbug — 2012-02-01T22:32:25Z
This is actually a bit worse. If you swap the order of the private static and public virtual foo, it compiles! class A { private static void foo(int i) {} public void foo() {} } class B { void bar(int x) { A.foo (x); } }