botan icon indicating copy to clipboard operation
botan copied to clipboard

Workaround of wrong foreach inference

Open shoo opened this issue 3 years ago • 0 comments

In dmd 2.099.0-beta.1, I get four errors similar to the following. This pull request is a workaround.

source\botan\tls\channel.d(574,13): Error: `memutils.hashmap.HashMap!(ushort, ConnectionCipherState, ThreadMem).HashMap.opApply` called with argument types `(int delegate(ref const(ushort) k, ref const(ConnectionCipherState) v) @system)` matches both:
\dub\packages\memutils-1.0.4\memutils\source\memutils\hashmap.d(153,6):     `memutils.hashmap.HashMap!(ushort, ConnectionCipherState, ThreadMem).HashMap.opApply(int delegate(ref const(ushort), ref ConnectionCipherState) del)`
and:
\dub\packages\memutils-1.0.4\memutils\source\memutils\hashmap.d(162,6):     `memutils.hashmap.HashMap!(ushort, ConnectionCipherState, ThreadMem).HashMap.opApply(int delegate(in ref ushort, in
 ref ConnectionCipherState) del) const`

shoo avatar Feb 19 '22 06:02 shoo