Files
v/doc/function-field-calls.md
Alexander Medvednikov 7b6eda70b7 driver: preserve local receiver types when restoring C functions (#29219)
* driver: preserve local receiver types when restoring C functions

* tests: account for reflection and function-call documentation

* tests: cover C function values beside receivers sharing their name
2026-10-01 15:10:50 +03:00

468 B

Function field calls

A function stored in a struct field can be called through the struct value, for example holder.callback(21). The receiver uses the type of its local variable or parameter. Local names such as wait, read, and close may also be used when a C function has the same name. This applies to value receivers, pointer receivers, and iteration variables.

Function field calls compile with -new-compiler without a compatibility compiler retry.