q/tests/programs/function-pointer-field.q

16 lines
132 B
Plaintext

import sys
Struct {
func *any
}
main() {
s := new(Struct)
s.func = f
s.func(0)
sys.exit(1)
}
f(code int) {
sys.exit(code)
}