www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12185] New: AA get() is getting in the way of diagnostics

reply d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12185

           Summary: AA get() is getting in the way of diagnostics
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: druntime
        AssignedTo: nobody puremagic.com
        ReportedBy: andrej.mitrovich gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2014-02-16
14:41:33 PST ---
void main()
{
    auto x = not;
}

test.d(5): Error: undefined identifier not, did you mean template get(T :
Value[Key], Value, Key, K, V)(T aa, K key, lazy V defaultValue) if
(is(typeof(true ? aa[key] : defaultValue)))?

Unfortunately due to the recent AA changes the new UFCS functions are getting
picked up by the spellchecker. I'm getting the above diagnostic more and more
frequently. I wonder if we can do something about this without adding special
cases to the compiler.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 16 2014
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12185


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yebblies gmail.com


--- Comment #1 from yebblies <yebblies gmail.com> 2014-02-17 13:15:58 EST ---
We could tweak the spell-checker so with len=3 it requires diff < 2

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 16 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12185



--- Comment #2 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2014-02-17
00:33:07 PST ---
Maybe I should rename this to "spellchecker recommends symbols which look
nothing like each other". not => get is an awful recommendation here.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 17 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12185



--- Comment #3 from yebblies <yebblies gmail.com> 2014-02-18 00:21:47 EST ---
(In reply to comment #2)
 Maybe I should rename this to "spellchecker recommends symbols which look
 nothing like each other". not => get is an awful recommendation here.

But they only differ by two characters!!! -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 17 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12185



--- Comment #4 from yebblies <yebblies gmail.com> 2014-02-18 00:44:17 EST ---
-    size_t maxdist = seedlen < 3 ? seedlen - 1 : 2;
+    size_t maxdist = seedlen < 3 ? seedlen - 1 : seedlen == 3 ? 1 : 2;

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 17 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12185



--- Comment #5 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2014-02-17
05:58:51 PST ---
(In reply to comment #4)
 -    size_t maxdist = seedlen < 3 ? seedlen - 1 : 2;
 +    size_t maxdist = seedlen < 3 ? seedlen - 1 : seedlen == 3 ? 1 : 2;

Don't we have a natural language processing / AI expert among us? Cough cough Andrei. :) -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 17 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12185



--- Comment #6 from yebblies <yebblies gmail.com> 2014-02-18 01:01:27 EST ---
(In reply to comment #5)
 
 Don't we have a natural language processing / AI expert among us? Cough cough
 Andrei. :)

"undefined identifier 'not', but all your facebook friends liked this page about cats! <link>" -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 17 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12185



--- Comment #7 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2014-02-17
06:03:51 PST ---
(In reply to comment #6)
 (In reply to comment #5)
 
 Don't we have a natural language processing / AI expert among us? Cough cough
 Andrei. :)

"undefined identifier 'not', but all your facebook friends liked this page about cats! <link>"

LOL. So you planning on making this pull or too busy now? -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 17 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12185



--- Comment #8 from yebblies <yebblies gmail.com> 2014-02-18 01:05:32 EST ---
(In reply to comment #7)
 (In reply to comment #6)
 (In reply to comment #5)
 
 Don't we have a natural language processing / AI expert among us? Cough cough
 Andrei. :)

"undefined identifier 'not', but all your facebook friends liked this page about cats! <link>"

LOL. So you planning on making this pull or too busy now?

Haha I'll go do it. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 17 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12185


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
          Component|druntime                    |DMD
            Summary|AA get() is getting in the  |Spellchecker matches symbol
                   |way of diagnostics          |that are more than 50%
                   |                            |different


--- Comment #9 from yebblies <yebblies gmail.com> 2014-02-18 01:12:17 EST ---
https://github.com/D-Programming-Language/dmd/pull/3276

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 17 2014
prev sibling next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12185



--- Comment #10 from github-bugzilla puremagic.com 2014-02-17 12:30:26 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/032a6292e9c9fa354540e5afab079574d27b7f71
Fix Issue 12185 - Spellchecker matches symbols that are more than 50% different

https://github.com/D-Programming-Language/dmd/commit/a98247dc37c27b1fb39b60b7d3be434975ee3984
Merge pull request #3276 from yebblies/issue12185

Issue 12185 - Spellchecker matches symbols that are more than 50% different

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 17 2014
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12185


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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