The current implementation of the spell checker (as far as I can tell) always finds the nearest match to the incorrectly spelled symbol.
So the following example:
struct S2 {}
struct S10 {}
void main()
{
S10 a = S();
}
Will emit the error:
spell.d(6): Error: undefined identifier S, did you mean struct S2?
Whereas it would be an improvement in these cases if it were to suggest the lhs type instead.
Regards
Comment #1 by bugzilla — 2011-03-03T16:08:00Z
Implementing this would be difficult as it requires top-down type inference, whereas the semantic analysis is all done bottom-up.
Comment #2 by ibuclaw — 2013-11-17T07:00:20Z
*** Issue 10241 has been marked as a duplicate of this issue. ***