style-warning for recursive call in non-toplevel defgeneric
Bug #500318 reported by
Tobias C. Rittweiler
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Confirmed
|
Low
|
Unassigned |
Bug Description
COMPILE-FILEing
(let ()
(defgeneric fact2 (n)
(:method ((n integer))
(if (zerop n)
1
(* n (fact2 (1- n)))))))
(let ()
(defun fact1 (n)
(if (zerop n)
1
(* n (fact1 (1- n))))))
results in
; file: /tmp/foo.lisp
; in: DEFGENERIC FACT2
; (FACT2 (1- N))
;
; caught STYLE-WARNING:
; undefined function: FACT2
;
; compilation unit finished
; Undefined function:
; FACT2
; caught 1 STYLE-WARNING condition
As you see, the recursive call in the non-toplevel DEFUN results in no style-warning,
but the same for the DEFGENERIC form does.
This is valid behaviour, just a tad bit inconsistent.
Changed in sbcl: | |
status: | New → Confirmed |
importance: | Undecided → Low |
summary: |
- recursive call in non-toplevel defgeneric + style-warning for recursive call in non-toplevel defgeneric |
tags: | added: compiler pcl |
To post a comment you must log in.