Bug 9997 – Missed misspell suggestions for UFCS

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-04-26T12:43:49Z
Last change time
2024-07-08T14:12:43Z
Keywords
diagnostic, pull
Assigned to
No Owner
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2013-04-26T12:43:49Z
import std.string; void main() { auto s = "red blue"; auto r1 = s.splitlines; auto r2 = splitlines(s); } dmd 2.063alpha gives: temp.d(6): Error: no property 'splitlines' for type 'string' temp.d(7): Error: undefined identifier splitlines, did you mean template splitLines(S)(S s, KeepTerminator keepTerm = KeepTerminator.no) if (isSomeString!(S))? Is it possible for the compiler to show the "did you mean" for "s.splitlines"?
Comment #1 by josipp — 2022-04-03T18:18:12Z
Old request, I'm gonna go and leave my thoughts anyway... If this were to be considered, the debate around @property and its interaction with UFCS would need to come to some conclusion, which it did not AFAIK.
Comment #2 by dkorpel — 2022-04-03T19:29:28Z
This has nothing to do with @property, splitLines is a regular function and it's not returning a callable.
Comment #3 by dlang-bot — 2024-07-08T11:31:43Z
@ntrel created dlang/dmd pull request #16673 "Fix Bugzilla 9997 - Missed misspell suggestions for UFCS" fixing this issue: - Fix Bugzilla 9997 - Missed misspell suggestions for UFCS https://github.com/dlang/dmd/pull/16673
Comment #4 by dlang-bot — 2024-07-08T14:12:43Z
dlang/dmd pull request #16673 "Add speller suggestions for UFCS and pointer fields" was merged into master: - 97366596be4bdbcb0b2bee8b5b427406e6df25ed by Nick Treleaven: Fix Bugzilla 9997 - Missed misspell suggestions for UFCS https://github.com/dlang/dmd/pull/16673