Re: More fun with slot type checking
Raymond Toy <[email protected]>
| Newsgroups | gmane.lisp.cmucl.general |
|---|---|
| Message-ID | <[email protected]> |
>>>>> "dvl" == Didier Verna <[email protected]> writes: dvl> Regardless of the optimize settings, I will get an error every time I dvl> try to create a mystruct object; so it seems that CMU-CL performs dvl> structure slot type checking all the time. dvl> However, in the following case: dvl> (defstruct mystruct (slot "foo" :type fixnum)) dvl> I *never* get an error. I find this a bit inconsistent. Here's a wild I guess the difference is between interpreted and compiled code. If you compile it, there are compiler notes about a binding not being a fixnum. And indeed (make-mystruct) will signal a type error. But not if you type in the defstruct form into the repl. A deficiency in the interpreter, I guess. Ray