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
commit29c6e056d7fbaa1c2bcbe3f7b7ce747e589890b9 (patch)
tree55f4045140398edc068f9e166194f64e8a40eec2
parentc5cd46eeba312af592420344423a73a652d246d0 (diff)
downloadtxr-29c6e056d7fbaa1c2bcbe3f7b7ce747e589890b9.tar.gz
txr-29c6e056d7fbaa1c2bcbe3f7b7ce747e589890b9.tar.bz2
txr-29c6e056d7fbaa1c2bcbe3f7b7ce747e589890b9.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"