Can't inline structure slot accessor
Describe the bug
After the structure is defined, declaiming slot accessor to be inline signals an error:
Error in function C::NOTE-IF-ACCESSOR:
Redefining slot accessor STRUCT-SLOT for structure type STRUCT
This affects loading systems with asdf since it compiles files and then loads them. If one declaims a structure slot accessor to be inline, the project can't be loaded with cmucl.
To Reproduce
In REPL:
(defstruct struct slot)
(declaim (inline make-struct struct-slot))
; Error in function C::NOTE-IF-ACCESSOR:
; Redefining slot accessor STRUCT-SLOT for structure type STRUCT
; [Condition of type SIMPLE-ERROR]
;
; Restarts:
; 0: [CONTINUE] Assume redefinition is compatible and allow it
; 1: [RETRY] Retry SLIME REPL evaluation request.
; 2: [*ABORT] Return to SLIME's top level.
; 3: [ABORT] Return to Top-Level.
;
; Backtrace:
; 0: (C::NOTE-IF-ACCESSOR STRUCT-SLOT)
; 1: (KERNEL:DEFINE-FUNCTION-NAME STRUCT-SLOT)
; 2: (PROCLAIM (INLINE STRUCT-SLOT))
; 3: (PROCLAIM 1 (INLINE STRUCT-SLOT))[:EXTERNAL]
; 4: (EVAL (DECLAIM (INLINE STRUCT-SLOT)))
; ... (swank/slime related)
Expected behavior
The condition shouldn't be signaled, slot accessor should be declaimed inline.
Desktop (please complete the following information):
- OS: Linux
- Version: 21e