Bug 21366 – `private` ignored for circular imports

Status
RESOLVED
Resolution
DUPLICATE
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2020-11-07T02:46:46Z
Last change time
2022-09-08T06:47:42Z
Keywords
pull
Assigned to
No Owner
Creator
andy.pj.hanson

Comments

Comment #0 by andy.pj.hanson — 2020-11-07T02:46:46Z
**app.d:** ``` import std.stdio : writeln; import b : two; void main() { writeln(two()); } private int one() { return 1; } ``` **b.d:** ``` module b; import app : one; int two() { return one() + one(); } ``` Module `b` should not be allowed to import `one`, but it compiles without error. (Ran `dmd app.d b.d`.) Tested with `dmd --version` of `DMD64 D Compiler v2.094.1`.
Comment #1 by dlang-bot — 2021-11-03T11:34:36Z
@RazvanN7 updated dlang/dmd pull request #13257 "Fix Issue 21829, Fix Issue 21366 - is ignored when a public overload exists" fixing this issue: - Fix Issues 21829, 21366 - is ignored when a public overload exists https://github.com/dlang/dmd/pull/13257
Comment #2 by razvan.nitu1305 — 2022-09-08T06:47:42Z
*** This issue has been marked as a duplicate of issue 21829 ***