Bug 9104 – No line number with private name found by "did you mean"

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2012-12-02T11:23:00Z
Last change time
2012-12-02T11:41:08Z
Assigned to
nobody
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2012-12-02T11:23:46Z
It seems the routine that finds similar names has to exclude not visibile names: import std.typetuple; void main() { Park x; } DMD 2.061alpha gives two wrong error messages: Error: module test std.typetuple.Pack(T...) is private test.d(3): Error: undefined identifier Park, did you mean template Pack(T...)? Expected error message: test.d(3): Error: undefined identifier Park
Comment #1 by issues.dlang — 2012-12-02T11:31:40Z
> It seems the routine that finds similar names has to exclude not visibile names: Except that private symbols _are_ visibile. They're just not accessible. It would be cool if we could convince Walter of making them invisible (at least as far as stuff like overload sets go), but they're definitely visible. That being said, I don't know that it's a good idea for the spell checker to be suggesting symbols which are inaccessible, and it definitely shouldn't be complaining about them being private when _it_ is the one using them and not the actual code.
Comment #2 by andrej.mitrovich — 2012-12-02T11:41:08Z
*** This issue has been marked as a duplicate of issue 7956 ***