aboutsummaryrefslogtreecommitdiff
path: root/src/propspec.lisp
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-03-17 19:11:24 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-03-18 09:55:57 -0700
commit2403f5c0a09915cd1100159953fa8430f0417ced (patch)
treee9a89e2352f8e9ee595100006105bc8860d97e86 /src/propspec.lisp
parent2ec53b9d3e0ca7eadab33ceba03ffa8b55e3f26e (diff)
downloadconsfigurator-2403f5c0a09915cd1100159953fa8430f0417ced.tar.gz
record which symbols are properties at compile time
This is for the sake of PROPS. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/propspec.lisp')
-rw-r--r--src/propspec.lisp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/propspec.lisp b/src/propspec.lisp
index f295081..c51b7df 100644
--- a/src/propspec.lisp
+++ b/src/propspec.lisp
@@ -109,17 +109,17 @@ arguments to properties in propapps, but that should not be needed."
(error ()
(error 'invalid-or-ambiguous-propspec :propspec propspec)))))
;; Now we use a dummy macro expansion pass to find any symbols without
- ;; function definitions occurring in function call positions. These
- ;; could potentially be properties whose definitions have not been
- ;; loaded -- especially since we get called at compile time by PROPS --
- ;; and if so, we would return an incorrect result because the previous
- ;; step will not have identified all the propapps in the propspec. So
- ;; error out if we detect that situation.
+ ;; function or property definitions occurring in function call
+ ;; positions. These could potentially be properties whose definitions
+ ;; have not been loaded -- especially since we get called at compile
+ ;; time by PROPS -- and if so, we would return an incorrect result
+ ;; because the previous step will not have identified all the propapps
+ ;; in the propspec. So error out if we detect that situation.
(macrolet-and-expand
(loop for leaf in (delete-duplicates (flatten expanded))
if (and (symbolp leaf) (not (isprop leaf)))
collect `(,leaf (&rest args)
- (unless (fboundp ',leaf)
+ (unless (or (fboundp ',leaf) (isprop ',leaf))
(error 'ambiguous-propspec :name ',leaf))
;; return something which looks like an
;; ordinary function call to the code walker,