[Issue 23449] New: spellchecker should suggest corrections for pointer members

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Nov 1 03:49:22 UTC 2022


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 at puremagic.com
          Reporter: schveiguy at 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.

--


More information about the Digitalmars-d-bugs mailing list