aboutsummaryrefslogtreecommitdiffstats
path: root/interpret.h
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2015-06-25 22:21:20 +0300
committerArnold D. Robbins <arnold@skeeve.com>2015-06-25 22:21:20 +0300
commit0302c2f241b0a4ab47a0e60213c132c4135fed93 (patch)
tree87a499985100b2cf726a358bf8ee06d9d2696dc0 /interpret.h
parenta3e0954544c7cc4f34b710ac863d56419b57915a (diff)
downloadegawk-0302c2f241b0a4ab47a0e60213c132c4135fed93.tar.gz
egawk-0302c2f241b0a4ab47a0e60213c132c4135fed93.tar.bz2
egawk-0302c2f241b0a4ab47a0e60213c132c4135fed93.zip
More work straightening out typeof, including tests.
Diffstat (limited to 'interpret.h')
-rw-r--r--interpret.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/interpret.h b/interpret.h
index 554a7663..1005174a 100644
--- a/interpret.h
+++ b/interpret.h
@@ -177,6 +177,7 @@ top:
case Node_var_new:
uninitialized_scalar:
if (op != Op_push_arg_untyped) {
+ /* convert untyped to scalar */
m->type = Node_var;
m->var_value = dupnode(Nnull_string);
}
@@ -185,7 +186,8 @@ uninitialized_scalar:
_("reference to uninitialized argument `%s'") :
_("reference to uninitialized variable `%s'"),
save_symbol->vname);
- m = dupnode(Nnull_string);
+ if (op != Op_push_arg_untyped)
+ m = dupnode(Nnull_string);
PUSH(m);
break;