Opened 7 years ago

Closed 5 years ago

Last modified 3 years ago

#1101 closed defect (fixed)

(defun nil () t)

Reported by: ridiculous Owned by:
Priority: normal Milestone:
Component: Runtime (threads, GC) Version: 1.9
Keywords: Cc:

Description (last modified by rme)

Up-to-date linux, amdfam10, clozure 1.9 amd64 and ia32, both behave identically as far as this message is concerned. I don't know CL well, sorry, I'm just busting nil's irritatingly-anything-but-nihilistic chops.

  Welcome to Clozure Common Lisp Version 1.9-r15757  (LinuxX8664)!
  ? (defun nil () t)
  Lisp Breakpoint
  ? for help
  [15021] Clozure CL kernel debugger: 

  Welcome to Clozure Common Lisp Version 1.9-r15757  (LinuxX8664)!
  ? (defun t () nil)
  T
  ? (t)
  NIL

The former seems too harsh and the latter too lenient. Raising exception seems about right, though. This crap shouldn't work either...

  Welcome to Clozure Common Lisp Version 1.9-r15757  (LinuxX8664)!
  ? (setf (symbol-function nil) (lambda () t))
  #<Anonymous Function #x3020006F846F>
  ? (fboundp nil)
  #<Anonymous Function #x3020006F846F>
  ? (nil)
  > Error: NIL is not of type (OR SYMBOL FUNCTION), and can't be FUNCALLed or APPLYed
  > While executing: CCL::TOPLEVEL-EVAL, in process listener(1).
  > Type :POP to abort, :R for a list of available restarts.
  > Type :? for other options.
  1 > (symbolp nil)
  T
  1 > ;eof
  ? (funcall (symbol-function nil))
  T

But it didn't even do the wrong thing right, heh, (nil) raised an error.

This ticket-reporting thing didn't allow me to specify Version 1.9, only some milestone thing.

Regards, Andy Gaynor, euphoria@…

Change History (4)

comment:1 Changed 7 years ago by ridiculous

Your ticket-creating software is... unimpressive. Just look at the hash it made of my meticulously-formatted message. It would be interesting to count the number of errors it introduced. Aleph what? :) --Ag

comment:2 Changed 7 years ago by rme

  • Description modified (diff)
  • Version changed from trunk to 1.9

Formatting in description fixed up a bit; 1.9 version added to the ticket pop-up and set as version for this ticket.

See also ticket:613, of which this report is mainly a duplicate.

comment:3 Changed 5 years ago by rme

  • Resolution set to fixed
  • Status changed from new to closed

(In [16649]) Make defun complain if the user attempts to use NIL as a function name. Closes ticket:613, ticket:1101. (And see ticket:1125 too.)

comment:4 Changed 3 years ago by rme

  • Milestone Clozure CL 1.9 deleted

Milestone Clozure CL 1.9 deleted

Note: See TracTickets for help on using tickets.