| 1 | // This module declares an indirect call (`f(x)` in `apply`) but never takes a |
| 2 | // concrete function as a value, so `fn_value_indices` stays empty. The indirect |
| 3 | // function table must still be emitted, otherwise the `call_indirect` references |
| 4 | // a table that does not exist and the module fails to validate. |
| 5 | pub fn apply(f fn (int) int, x int) int { |
| 6 | return f(x) |
| 7 | } |
| 8 | |
| 9 | fn main() { |
| 10 | println('ok') |
| 11 | } |
| 12 |