You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For methods defined on interfaces (vs concrete methods), the resolution
of the method is necessarily delayed at the run time and can not be
completed at compile time.
The selectorExpr processing has been changed to correctly identify
calls on interface methods which were confused as fields rather
than methods (due to the fact that in a interface definition, methods
are fields of the interface).
Then at runtime, method lookup has been fixed to correctly recurse in
nested valueInterface wrappers and to find embedded interface fields
in case of struct or pointer to structs.
Fixestraefik#1515.
For methods defined on interfaces (vs concrete methods), the resolution of the method is necessarily delayed at the run time and can not be completed at compile time.
The selectorExpr processing has been changed to correctly identify calls on interface methods which were confused as fields rather than methods (due to the fact that in a interface definition, methods are fields of the interface).
Then at runtime, method lookup has been fixed to correctly recurse in nested valueInterface wrappers and to find embedded interface fields in case of struct or pointer to struct.
Finally, remove receiver processing in `call()`.The receiver is already processed at method resolution and in genFunctionWrapper. Removing redundant processing in call fixes handling of variadic method, simplifies the code and makes it faster.
With those fixes, it is now possible to load and run `go.uber.org/zap` in yaegi. In turn, it makes possible for yaegi to run plugins dependent on zap, such as coraza-waf.
Fixes#1515,
Fixes#1172,
Fixes#1275,
Fixes#1485.
The following program
sample.go
triggers an unexpected resultExpected result
Got
Yaegi Version
v0.15.0
Additional Notes
This issue is related to #1172
The text was updated successfully, but these errors were encountered: