On Wed, May 15, 2019 at 05:53:17PM -0700, H. S. Teoh via Digitalmars-d-announce wrote: > On Wed, May 15, 2019 at 11:34:44AM -0700, Walter Bright via > Digitalmars-d-announce wrote: > > On 5/15/2019 11:09 AM, H. S. Teoh wrote: > > > *Why* putting 'private' on a field member makes toHash unsafe, is > > > beyond my ability to comprehend. > > > > That's because the reduced version isn't a reduced version. It > > imports a vast amount of other code. > > Alright, here's a TRULY reduced version:
Gah, so apparently .hashOf is a gigantic overload set of *21* different overloads, so this is not really "truly" reduced. =-O Anybody up for figuring out which overload(s) is/are getting called? Betcha the problem is that -preview=dip1000 causes one of the overloads to fail to compile, thus shuffling to a different overload that isn't @safe. I hate SFINAE. T -- Just because you survived after you did it, doesn't mean it wasn't stupid!