Bug 20637 – spelling correction offers private members

Status
RESOLVED
Resolution
FIXED
Severity
trivial
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2020-03-05T10:34:55Z
Last change time
2020-09-06T22:14:25Z
Keywords
pull
Assigned to
No Owner
Creator
FeepingCreature

Comments

Comment #0 by default_357-line — 2020-03-05T10:34:55Z
Repro: a.d: class A { private static void foo() { } } b.d: import a; void main() { A.foo; } `dmd a.d b.d` outputs: > b.d(3): Error: no property foo for type a.A, did you mean a.A.foo? DMD should not report inaccessible private members as spelling corrections.
Comment #1 by b2.temp — 2020-03-05T10:56:18Z
*** This issue has been marked as a duplicate of issue 5839 ***
Comment #2 by default_357-line — 2020-03-05T12:40:50Z
Different issue: private member of class is a separate codepath from private member of module.
Comment #3 by dlang-bot — 2020-03-05T12:46:57Z
@FeepingCreature created dlang/dmd pull request #10867 "Fix/issue 20637 dont offer private type property corrections" fixing this issue: - Fix issue 20637: don't offer type property corrections if they aren't visible from the current scope. https://github.com/dlang/dmd/pull/10867
Comment #4 by schveiguy — 2020-03-05T17:41:42Z
(In reply to FeepingCreature from comment #2) > Different issue: private member of class is a separate codepath from private > member of module. So does this mean we should re-close 5839? Technically this is a duplicate of my issue 20531 which was closed as a duplicate of 5839 I just want to make sure we don't still have 2 reports open if there aren't still 2 separate issues.
Comment #5 by dlang-bot — 2020-03-06T06:10:53Z
dlang/dmd pull request #10867 "Fix issue 20637: Don't offer private type property corrections" was merged into master: - 388a16e0968cd7034068d49b4a6f71d84f1889b4 by Mathis Beer: Fix issue 20637: don't offer type property corrections if they aren't visible from the current scope. https://github.com/dlang/dmd/pull/10867
Comment #6 by pro.mathias.lang — 2020-03-23T07:02:03Z
*** Issue 20694 has been marked as a duplicate of this issue. ***
Comment #7 by pro.mathias.lang — 2020-09-06T22:14:25Z
*** Issue 5839 has been marked as a duplicate of this issue. ***