Bug 23449 – spellchecker should suggest corrections for pointer members
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-11-01T03:49:22Z
Last change time
2024-07-08T14:12:43Z
Keywords
pull
Assigned to
No Owner
Creator
Steven Schveighoffer
Comments
Comment #0 by schveiguy — 2022-11-01T03:49:22Z
If I have a struct, and I spell a member wrong, I get a suggestion for a closely-spelled item.
But if I have a pointer to a struct, I don't get the same suggestion:
```d
struct S {
int foo;
}
void main()
{
S s;
auto sp = &s;
s.fool = 5;
sp.fool = 5;
}
```
resulting error:
```
onlineapp.d(9): Error: no property `fool` for type `S`, did you mean `onlineapp.S.foo`?
onlineapp.d(10): Error: no property `fool` for type `onlineapp.S*`
```
The spell check should be performed for struct pointers.
Comment #1 by dlang-bot — 2024-07-08T12:07:13Z
@ntrel updated dlang/dmd pull request #16673 "Fix Bugzilla 9997 - Missed misspell suggestions for UFCS" fixing this issue:
- Fix Bugzilla 23449 - spellchecker should suggest corrections for pointer members
https://github.com/dlang/dmd/pull/16673
Comment #2 by dlang-bot — 2024-07-08T14:12:43Z
dlang/dmd pull request #16673 "Add speller suggestions for UFCS and pointer fields" was merged into master:
- 2da873a6313ab222721a403b4914d8f19af60fff by Nick Treleaven:
Fix Bugzilla 23449 - spellchecker should suggest corrections for pointer members
https://github.com/dlang/dmd/pull/16673