Bug 18219 – Private import inside struct leaks symbols when used as VarDeclaration types

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2018-01-10T08:40:29Z
Last change time
2021-04-03T01:03:38Z
Assigned to
No Owner
Creator
RazvanN

Comments

Comment #0 by razvan.nitu1305 — 2018-01-10T08:40:29Z
// a.d class Foobar { int a; this(int a) { this.a = a; } static int smeth() { return 1; } } void fun() {} // b.d struct AST { import a; } // c.d void main() { import b; AST.Foobar t; // compiles AST.Foobar.smeth(); // does not compile AST.fun(); // does not compile } `AST.Foobar t` should not compile.
Comment #1 by razvan.nitu1305 — 2018-01-10T10:27:18Z
Comment #2 by github-bugzilla — 2018-01-22T15:30:07Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/9bcb80a1aff7ab3aab11b64115621220a2771753 Fix Issue 18219 - Private import inside struct leaks symbols when used as VarDeclaration types https://github.com/dlang/dmd/commit/1018db023831a8c348bb8f9121b08fabb6e32fc2 Merge pull request #7668 from RazvanN7/Lookup Fix Issue 18219 - Private import inside struct leaks symbols when used as VarDeclaration types
Comment #3 by dlang-bot — 2021-04-03T01:03:38Z
dlang/dmd pull request #12350 "[dmd-cxx] More fixes for package import visibility" was merged into dmd-cxx: - 3f2b5129622e51eb3108b440475cb1112ec45c0b by RazvanN7: [dmd-cxx] Fix Issue 18219 - Private import inside struct leaks symbols when used as VarDeclaration types https://github.com/dlang/dmd/pull/12350