I am unsure whether this is a bug or not, but the current docs of OCONVNOP is as follows:
|
OCONVNOP // Type(X) (type conversion, no effect) |
Note the "no effect", but actually it can change the type:
type Impl struct{}
type implWrapper Impl
func _() {
i := &Impl{}
_ = (*implWrapper)(i) // OCONVNOP
}
Is this the expected behavior? If so i think that the docs should be updated, as it might be confusing (as it is a NOP).
CC @golang/compiler