Skip to content

Conversation

@odersky
Copy link
Contributor

@odersky odersky commented Jan 5, 2020

The previous implementation was very obscure and wrong on multiple counts

  • It handled just definitions in the qualifier class itself instead of all of its members
  • It computed the Levenshtein distance wrongly
  • There might be other problems - the code was too convoluted to be able to tell what it did.

 - Handle all members instead of just decls.
 - Simplify the logic and implementation.

To tell the truth, the previous implementation was too convoluted for me
to be able to say what it does exactly. But the new one seems to fit the
intuitive spec.
The previous algorithm was simply wrong, which went undiscovered because
there were no tests to its correctness.

Morale: Just because some code is purely functional does not mean it is
clear or correct.
@odersky odersky added the fasttrack Simple fix. Reviewer should merge or apply additional changes directly. label Jan 6, 2020
smarter
smarter previously requested changes Jan 6, 2020
@anatoliykmetyuk anatoliykmetyuk merged commit 5968d41 into scala:master Jan 7, 2020
@anatoliykmetyuk anatoliykmetyuk deleted the refactor-hints branch January 7, 2020 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fasttrack Simple fix. Reviewer should merge or apply additional changes directly.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants