What version of Go are you using (go version)?
$ go version
go version devel go1.18-8ac5cbe05d Fri Oct 1 04:32:04 2021 +0000 windows/amd64
Does this issue reproduce with the latest release?
No.
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
What did you do?
The reproducer is quite complex, so I pushed it into the repo https://github.com/tdakkota/goissue-48716.
I tried to simplify it, but had no success. It seems bug appears only if Map interface is imported from another package.
What did you expect to see?
Successful compilation.
What did you see instead?
<autogenerated>:1: cannot use cb (type func(alg.Pair[int,struct{}]) bool) as type func(alg.Pair[.shape.int_0,.shape.struct{}_1]) bool in argument to maps.HashMap[.shape.int_0,.shape.struct{}_1].Iterate
What version of Go are you using (
go version)?Does this issue reproduce with the latest release?
No.
What operating system and processor architecture are you using (
go env)?go envOutputWhat did you do?
The reproducer is quite complex, so I pushed it into the repo https://github.com/tdakkota/goissue-48716.
I tried to simplify it, but had no success. It seems bug appears only if
Mapinterface is imported from another package.What did you expect to see?
Successful compilation.
What did you see instead?