aboutsummaryrefslogtreecommitdiffstats
path: root/test/stupid3.awk
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2020-01-08 21:03:32 +0200
committerArnold D. Robbins <arnold@skeeve.com>2020-01-08 21:03:32 +0200
commita2a6e548bc3afcbf4c7401ebdfa8213dbe4e8dea (patch)
treea5688e69343d54c510d976750b41e4a5851e4518 /test/stupid3.awk
parentebe9dd1633c6f5e5d42e922a70f72829c14c193c (diff)
downloadegawk-a2a6e548bc3afcbf4c7401ebdfa8213dbe4e8dea.tar.gz
egawk-a2a6e548bc3afcbf4c7401ebdfa8213dbe4e8dea.tar.bz2
egawk-a2a6e548bc3afcbf4c7401ebdfa8213dbe4e8dea.zip
Fix problems passing uninitialized variables to typeof.
Diffstat (limited to 'test/stupid3.awk')
-rw-r--r--test/stupid3.awk16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/stupid3.awk b/test/stupid3.awk
new file mode 100644
index 00000000..fa57e65d
--- /dev/null
+++ b/test/stupid3.awk
@@ -0,0 +1,16 @@
+BEGIN {
+ test(someidentifier)
+}
+
+
+function test(p)
+{
+ test0(p)
+ p
+ test0(p)
+}
+
+function test0(p)
+{
+ print "TYPEOF: " typeof(p)
+}