www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 23449] New: spellchecker should suggest corrections for

https://issues.dlang.org/show_bug.cgi?id=23449

          Issue ID: 23449
           Summary: spellchecker should suggest corrections for pointer
                    members
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: schveiguy gmail.com

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.

--
Oct 31 2022