Environment arguments to type functions
Bug #309140 reported by
Nikodemus Siivola
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Confirmed
|
Medium
|
Unassigned |
Bug Description
Functions SUBTYPEP, TYPEP, UPGRADED-
UPGRADED-
argument, but they ignore it completely. This is almost
certainly not correct.
Bug 310120 is one example of problems caused by not having a separate
compilation environment, and TYPEP not using the third argument.
Changed in sbcl: | |
importance: | Undecided → Medium |
status: | New → Confirmed |
description: | updated |
description: | updated |
To post a comment you must log in.
I think the following test case is related. If I don't get anything wrong, it should print T both times
when being compile-and-loaded.
(eval-when (:compile-toplevel)
(deftype bar () 'fixnum))
(defmacro frob-with-bar (thing &environment env)
(if (typep thing 'bar env)
t
nil))
(defun quux1 ()
(frob-with-bar 42))
(print (quux1)) ; will print T
(eval-when (:compile-toplevel)
(deftype foo () 'fixnum))
(eval-when (:load-toplevel :execute)
(deftype foo () 'string))
(defmacro frob-with-foo (thing &environment env)
(if (typep thing 'foo env)
t
nil))
(defun quux2 ()
(frob-with-foo 42))
(print (quux2)) ; will print NIL