test/indirectbuiltin5.awk
raw| 1 | BEGIN { |
| 2 | print "test 1" |
| 3 | if (1) { |
| 4 | f = "awk::match" |
| 5 | @f(a, b, c) |
| 6 | # error: gawk: ./bug.gwk:7: fatal error: internal error |
| 7 | } |
| 8 | print "test 2" |
| 9 | if (1) { |
| 10 | f = "f1" |
| 11 | f1_ = "awk::patsplit" # or split, asort, asorti, index, substr ... |
| 12 | @f(a, b, c, d) |
| 13 | # error: Assertion failed: r->valref > 0, file awk.h, line 1295 |
| 14 | } |
| 15 | } |
| 16 | |
| 17 | function f1(a, b, c, d) |
| 18 | { |
| 19 | return @f1_(a, b) |
| 20 | } |