Merge branch 'fix-the-incf' into 'develop'

Fix INCF on a THE variable

Closes #401

See merge request !89
This commit is contained in:
Daniel Kochmański 2017-09-10 06:20:19 +00:00
commit db5a55c820
2 changed files with 11 additions and 4 deletions

View file

@ -560,10 +560,7 @@ retrieved by (DOCUMENTATION 'SYMBOL 'FUNCTION)."
(LIST*
(LIST
(CAR STORES)
(IF (AND (LISTP %REFERENCE) (EQ (CAR %REFERENCE) 'THE))
(LIST 'THE (CADR %REFERENCE)
(LIST* (QUOTE ,function) GETTER ,@varlist ,restvar))
(LIST* (QUOTE ,function) GETTER (MAPCAR #'CAR ALL-VARS))))
(LIST* (QUOTE ,function) GETTER (MAPCAR #'CAR ALL-VARS)))
(APPEND ALL-VARS LET-LIST)))
`(LET* ,(NREVERSE LET-LIST)
(DECLARE (:READ-ONLY ,@(mapcar #'first all-vars)

View file

@ -47,6 +47,16 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 12.2.* Numbers tests ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;
(test ansi.12.2.incf
(let ((foo 0)
(bar 0))
(flet ((inc () (incf foo)))
(incf (the fixnum bar) (inc)))
(is (= foo 1))))
;;;;;;;;;;;;;;;;;;;;;;;;;
;; 19.* Pathname tests ;;
;;;;;;;;;;;;;;;;;;;;;;;;;