From 5b6b7906c62397adc7a0377daabcd6555d5d9ea1 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 16 Jul 2017 22:00:18 -0700 Subject: getopts: Fix broken custom function option type. This was broken on 2016-11-03 by the commit "Support simple list arguments in getopts." The sys:opt-parsed type has no type slot. --- share/txr/stdlib/getopts.tl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/txr/stdlib/getopts.tl b/share/txr/stdlib/getopts.tl index 7cd89cfa..3454b73f 100644 --- a/share/txr/stdlib/getopts.tl +++ b/share/txr/stdlib/getopts.tl @@ -134,8 +134,8 @@ rec-type)) pieces))) (set me.arg (mapcar (usl arg) sub-opts)))) - ((or (symbolp me.type) (functionp me.type)) - (set me.arg (call me.desc.type me.arg)))))))) + ((or (symbolp type) (functionp type)) + (set me.arg (call type me.arg)))))))) (defmeth opts lambda (me key : dfl) (iflet ((o [me.opt-hash key])) o.arg dfl)) -- cgit v1.2.3