mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-22 20:42:03 -08:00
Merge branch 'fix-the-incf' into 'develop'
Fix INCF on a THE variable Closes #401 See merge request !89
This commit is contained in:
commit
db5a55c820
2 changed files with 11 additions and 4 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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 ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue