aboutsummaryrefslogtreecommitdiffstats
path: root/builtin.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-12-22 18:32:21 +0200
committerArnold D. Robbins <arnold@skeeve.com>2016-12-22 18:32:21 +0200
commit6402c9480ffcd8610b1322a381f0c14a42d95083 (patch)
treebbf1f2c00923c562b1ff346b5a6b759d58920902 /builtin.c
parent2af62b50e5b9574c0e169fb4d99c4912e56eef1f (diff)
parentaf31a6de1bd15d4d5f5520ebfcb1d24239b9a683 (diff)
downloadegawk-6402c9480ffcd8610b1322a381f0c14a42d95083.tar.gz
egawk-6402c9480ffcd8610b1322a381f0c14a42d95083.tar.bz2
egawk-6402c9480ffcd8610b1322a381f0c14a42d95083.zip
Merge branch 'master' into feature/fix-comments
Diffstat (limited to 'builtin.c')
-rw-r--r--builtin.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/builtin.c b/builtin.c
index 5d7c3764..f71d71dd 100644
--- a/builtin.c
+++ b/builtin.c
@@ -3988,7 +3988,6 @@ do_typeof(int nargs)
deref = false;
break;
case Node_val:
- case Node_var:
switch (fixtype(arg)->flags & (STRING|NUMBER|USER_INPUT|REGEX)) {
case STRING:
res = "string";
@@ -4017,6 +4016,14 @@ do_typeof(int nargs)
res = "untyped";
deref = false;
break;
+ case Node_var:
+ /*
+ * Note: this doesn't happen because the function calling code
+ * in interpret.h pushes Node_var->var_value.
+ */
+ fatal(_("typeof: invalid argument type `%s'"),
+ nodetype2str(arg->type));
+ break;
default:
fatal(_("typeof: unknown argument type `%s'"),
nodetype2str(arg->type));