Thread overview
[Issue 9644] New: Spell checker gives silly suggestions for 1-2 character symbols
Mar 04, 2013
Don
Mar 04, 2013
Don
Mar 12, 2013
Andrej Mitrovic
March 04, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9644

           Summary: Spell checker gives silly suggestions for 1-2
                    character symbols
           Product: D
           Version: D1 & D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: clugdbug@yahoo.com.au


--- Comment #0 from Don <clugdbug@yahoo.com.au> 2013-03-04 09:19:26 PST ---
int q7;

int main()
{
    return ii;
}

bug.d(4): Error: undefined identifier ii, did you mean variable q7?

No, of course I didn't.

Compiler suggests any symbol that varies by at most two changes from the
target, but that's too much for a symbol which is only two changes away from
the empty string.
The limit should be one character for symbols which are one or two characters
long.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 04, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9644


Don <clugdbug@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
           Severity|normal                      |trivial


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
March 12, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9644


Andrej Mitrovic <andrej.mitrovich@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich@gmail.com


--- Comment #1 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-03-11 17:40:46 PDT ---
Actually it's pretty bad for 3 characters too. For example:

int tup;

void main()
{
    map = 1;
}

> Error: undefined identifier map, did you mean variable tup?

Also, the spellchecker likes to suggest variables even if we tried to make a function call. I think it should take that into account (at least for types which are fundamental or which don't define opCall).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------