May 16, 2009 [Issue 2991] New: Import within aggregate causes conflicts with private identifiers | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=2991 Summary: Import within aggregate causes conflicts with private identifiers Product: D Version: 1.043 Platform: All OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P3 Component: DMD AssignedTo: bugzilla@digitalmars.com ReportedBy: matti.niemenmaa+dbugzilla@iki.fi The following two-file code doesn't compile: b.d: private void foo() {} a.d: void foo() {} class C { import b; void bar() { foo(); } } The resulting errors from 'dmd -c a.d': a.d(3): Error: class a.C b.foo is private a.d(6): Error: function b.foo is not accessible from a If the import and/or function bar are moved to the global scope, the code is accepted. The private identifier from module b shouldn't be visible in module a, so no error should result. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation