reflect: don't construct an interface-in-interface value

v.Interaface() could construct an interface in interface value if v was
of type interface. This is not correct, and doesn't follow upstream Go
behavior. Instead, it should return the interface value itself.
This commit is contained in:
Ayke van Laethem
2021-08-15 14:58:59 +02:00
committed by Ron Evans
parent b534dd67e0
commit d15e32fb89
3 changed files with 28 additions and 0 deletions
+4
View File
@@ -377,3 +377,7 @@ type assertion succeeded for unreferenced type
struct tags
blue gopher
v.Interface() method
kind: interface
int 5