aboutsummaryrefslogtreecommitdiffstats
path: root/builtin.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin.c')
-rw-r--r--builtin.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/builtin.c b/builtin.c
index 1dd7dcbe..6ad4de36 100644
--- a/builtin.c
+++ b/builtin.c
@@ -3891,11 +3891,13 @@ do_typeof(int nargs)
case Node_val:
case Node_var:
if (arg == Nnull_string)
- res = "untyped";
- else if ((arg->flags & STRING) != 0)
- res = "scalar_s";
- else if ((arg->flags & NUMBER) != 0)
- res = "scalar_n";
+ res = "unassigned";
+ else if ((arg->flags & STRING) != 0) {
+ res = "string";
+ if ((arg->flags & MAYBE_NUM) != 0)
+ res = "strnum";
+ } else if ((arg->flags & NUMBER) != 0)
+ res = "number";
break;
case Node_var_new:
res = "untyped";