On Wednesday, March 19, 2025 5:48:37 PM MDT H. S. Teoh via Digitalmars-d-learn wrote: > On Wed, Mar 19, 2025 at 11:21:15PM +0000, monkyyy via Digitalmars-d-learn > wrote: > [...] > > ufcs on local functions is hit or miss; > [...] > > I thought it was always a miss. :-D At least, it's never worked for me > every time I tried it. I always have to move the UFCS function to > module scope, then it works.
AFAIK, it's always a miss. There's a bug report somewhere where Kenji explained exactly why it works the way that it does, but I don't recall what he said. I also don't know if it was closed as "won't fix" or remember much that would make it easy to find, unfortunately. :| But there is a technical reason for the limitation, even if I don't remember what it is. - Jonathan M Davis