reflect: fix TestCanSetField

This commit is contained in:
Damian Gryski
2023-03-24 11:33:57 -07:00
committed by Ron Evans
parent 181d2ad2b4
commit 017ab4c352
+3
View File
@@ -639,6 +639,9 @@ func (v Value) Field(i int) Value {
// The fact that PkgPath is present means that this field is not
// exported.
flags &^= valueFlagExported
} else {
// Parent field may not have been exported but we are
flags |= valueFlagExported
}
size := v.typecode.Size()