Fixes lp#308921 -- bug was in the consistency checking, not the compiler
itself.
(let ((leaf (ref-leaf node)))
(when (functional-p leaf)
(if (eq (functional-kind leaf) :toplevel-xep)
- (unless (eq (component-kind (block-component (node-block node)))
- :toplevel)
+ (unless (component-toplevelish-p (block-component (node-block node)))
(barf ":TOPLEVEL-XEP ref in non-top-level component: ~S"
node))
(check-fun-reached leaf node)))))
(assert (equal type1 (sb-kernel:%simple-fun-type g)))
(assert (equal type0 (sb-kernel:%simple-fun-type h)))))
+(test-util:with-test (:name :bug-308921)
+ (let ((*check-consistency* t))
+ (ctu:file-compile
+ `((let ((exported-symbols-alist
+ (loop for symbol being the external-symbols of :cl
+ collect (cons symbol
+ (concatenate 'string
+ "#"
+ (string-downcase symbol))))))
+ (defun hyperdoc-lookup (symbol)
+ (cdr (assoc symbol exported-symbols-alist)))))
+ :load nil)))
+
;;; success