D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 20638 - spelling correction offers private member of package on named package access
Summary: spelling correction offers private member of package on named package access
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 Linux
: P1 trivial
Assignee: No Owner
URL:
Keywords: pull
Depends on:
Blocks:
 
Reported: 2020-03-05 13:10 UTC by FeepingCreature
Modified: 2020-03-06 07:20 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description FeepingCreature 2020-03-05 13:10:40 UTC
See #5839, #20637.

Repro:

a.d:
private void foo() { }
b.d:
import a;
void main() { a.foo; }

Expected:

b.d(2): Error: undefined identifier foo in module a

Got:

b.d(2): Error: undefined identifier foo in module a, did you mean function foo?
Comment 1 Dlang Bot 2020-03-05 13:24:01 UTC
@FeepingCreature created dlang/dmd pull request #10868 "Fix issue 20638: only offer correction for module property if symbol is visible." fixing this issue:

- Fix issue 20638: only offer correction for symbol, accessed as explicit module property, if symbol is visible.

https://github.com/dlang/dmd/pull/10868
Comment 2 Dlang Bot 2020-03-06 07:20:14 UTC
dlang/dmd pull request #10868 "Fix issue 20638: only offer correction for module property if symbol is visible." was merged into master:

- 0122454e8cbe9952698f61a833bcd31d44d989c7 by Mathis Beer:
  Fix issue 20638: only offer correction for symbol, accessed as explicit module property, if symbol is visible.

https://github.com/dlang/dmd/pull/10868