aboutsummaryrefslogtreecommitdiffstats
path: root/support
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-04-12 06:41:46 -0700
committerKaz Kylheku <kaz@kylheku.com>2022-04-12 06:41:46 -0700
commitc176b812d68da2284a221c8533a68a1aa290960b (patch)
tree7de45ed4e6920483fc093c15508ddfc0d242a295 /support
parent51ca241352218e6da8db10fe07c90e229a0bc1f8 (diff)
downloadegawk-c176b812d68da2284a221c8533a68a1aa290960b.tar.gz
egawk-c176b812d68da2284a221c8533a68a1aa290960b.tar.bz2
egawk-c176b812d68da2284a221c8533a68a1aa290960b.zip
@let: bug re-using previously array-typed location as scalar.
* awkgram.y (let_var_list): We must generate the Op_clear_var instruction even for variables which have initializers. Otherwise the initialization will bomb if the initializer is scalar, and the location we are re-using held an array previously. * interpret.h (r_interpret): Do not use the get_lhs function, which has complex semantics that depend on the existing type, and may initialize the value, as well as blow up for an array. We work directly with var->var_value. If var already has the new variable type, we have nothing to do. We now unref the prior value only if the prior type is Node_var, because prior array values and such don't support unref. * test/let1.awk: Extension of test case which reproduced this problem, plus additional test cases for coverage of the duplicated code in the Yacc grammar.
Diffstat (limited to 'support')
0 files changed, 0 insertions, 0 deletions