Spell checking errors can be hilarious

Steven Schveighoffer schveiguy at gmail.com
Wed Oct 14 02:16:30 UTC 2020


On 10/13/20 9:59 PM, Walter Bright wrote:
> On 10/13/2020 6:15 AM, Andrei Alexandrescu wrote:
>> On 10/12/20 8:36 PM, Walter Bright wrote:
>>> For std2021, there should be no 2 letter names.
>> "No".
> 
> That leaves me unsympathetic to claims that the 
> spellchecker/importhinter is "broken" and the examples are "to" and 
> "No". A disproportionately large number of typos will be matched to them.

void main()
{
     auto x = to!string(1);
}

Error: template instance to!string template to is not defined

BUT you do this instead:

     auto x = 1.to!string;

And you get:

Error: no property to for type int, perhaps import std.conv; is needed?

Clearly, something is not triggering, it should be the same suggestion 
for both cases. (FWIW, if this bug wasn't present, the gentlemen trying 
out D in the stream would have immediately imported std.conv and have 
been done)

-Steve


More information about the Digitalmars-d mailing list