summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2024-07-17 20:03:03 -0700
committerKaz Kylheku <kaz@kylheku.com>2024-07-17 20:03:03 -0700
commit8f026a4fc707243151faffb89586460354d41cd2 (patch)
tree55f4045140398edc068f9e166194f64e8a40eec2
parent759102b2cf00b102944e7f4b54eb70be40ff8326 (diff)
downloadtxr-8f026a4fc707243151faffb89586460354d41cd2.tar.gz
txr-8f026a4fc707243151faffb89586460354d41cd2.tar.bz2
txr-8f026a4fc707243151faffb89586460354d41cd2.zip
struct: slot warning only for bindable symbols.
* stdlib/struct.tl (sys:check-slot): Don't issue the diagnostic "<obj> isn't the name of a struct slot" for slots that are not bindable symbols like obj."abc".
-rw-r--r--stdlib/struct.tl3
1 files changed, 2 insertions, 1 deletions
diff --git a/stdlib/struct.tl b/stdlib/struct.tl
index 4d544b4d..892b5c05 100644
--- a/stdlib/struct.tl
+++ b/stdlib/struct.tl
@@ -228,7 +228,8 @@
^(sys:make-struct-lit ',name ',plist))
(defun sys:check-slot (form slot)
- (unless (or (sys:slot-types slot)
+ (unless (or (not (bindable slot))
+ (sys:slot-types slot)
(sys:static-slot-types slot))
(compile-defr-warning form ^(slot . ,slot)
"~s isn't the name of a struct slot"