[SR-9083] Hide underscored names from typo-correction #51584
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
good first issue
Good for newcomers
Additional Detail from JIRA
md5: 57b6ac2a640faa0f61ac4071937dd5ac
Issue Description:
Both the Swift stdlib and Apple's SDKs use leading underscores to indicate that something is an implementation detail and not for direct use; double underscores in particular have special meaning according to the C standard. We should avoid showing these names to the user in typo-correction unless the name the user typed also starts with an underscore.
The relevant code for this is in
TypeChecker::performTypoCorrection
; the place to add this check is probably thegetCallEditDistance
helper.The text was updated successfully, but these errors were encountered: