fset icon indicating copy to clipboard operation
fset copied to clipboard

style-warning: FSET:ITERATOR clobbers an earlier FTYPE proclamation

Open Ambrevar opened this issue 5 years ago • 2 comments

Whenever I load a project that depends on Fset, I get the following warning:

.quicklisp/dists/quicklisp/software/fset-20200427-git/Code/fset.lisp:1:1:
  style-warning: 
    Generic function FSET:ITERATOR clobbers an earlier FTYPE proclamation
    (FUNCTION (T &KEY &ALLOW-OTHER-KEYS) (VALUES FUNCTION &REST T)) for the same
    name with (FUNCTION (T &KEY &ALLOW-OTHER-KEYS) *).

Ambrevar avatar Jun 01 '20 09:06 Ambrevar

This appears to have something to do with making proclamations about the types of generic functions; a program I'm currently writing results in SBCL complaining about two generic functions "clobbering earlier FTYPE proclamation[s]". But I don't understand why it happens, or why it only happens for some of the generic functions whose types I've proclaimed.

schw1804 avatar Jul 24 '20 00:07 schw1804

Indeed. I'm not sure if this is specified in the standard or if it's specific to SBCL.

A workaround is to specify the argument types as a (declare (type ...)) in the generic or method.

Ambrevar avatar Jul 24 '20 06:07 Ambrevar