diff --git a/phpinspect-splayt.el b/phpinspect-splayt.el index 1dd6b2e..114215b 100644 --- a/phpinspect-splayt.el +++ b/phpinspect-splayt.el @@ -438,7 +438,7 @@ The PLACE is assigned the value of each node. (phpinspect-splayt-node-traverse-lr (sibling (phpinspect-splayt-node-right first)) (when (>= (phpinspect-splayt-node-key sibling) key-max) - (throw 'return all)) + (throw 'return (cdr all))) (setq all-rear (setcdr all-rear (cons (phpinspect-splayt-node-value sibling) nil)))) (if (and (phpinspect-splayt-node-parent first) diff --git a/test/test-buffer.el b/test/test-buffer.el index e7b0340..9df7b2a 100644 --- a/test/test-buffer.el +++ b/test/test-buffer.el @@ -467,3 +467,27 @@ class YYY { (phpinspect-buffer-project buffer) (phpinspect--make-type :name "\\TestClass")) "banana")))))) + +(ert-deftest phpinspect-buffer-map-imports () + (with-temp-buffer + (let ((buffer (phpinspect-make-buffer :buffer (current-buffer)))) + (insert "