Open zbysir opened 1 year ago
Is it more appropriate to generate a generic type in the gta
step? Is it possible to solve this problem?
Yaegi is an amazing project, but there are still some problems that need to be fixed. If someone also encounters this problem, maybe we can challenge it together. I am too limited by myself.
The following program
sample.go
triggers an unexpected resultExpected result
Got
Yaegi Version
0.15.1
Additional Notes
The key to reproduce this problem is to call another generic method(
clearData
) in a generic method(SetData
).The problem is probably around this code https://github.com/traefik/yaegi/blob/75e5f99bc5761d8e920e726f75932a31b6f06669/interp/type.go#L1172, but it's a very complicated problem, I don't have the ability to fix it, so I can only ask for help.
By the way, works fine if
clearData
is declared beforeSetData