|
From: SourceForge.net <no...@so...> - 2011-04-30 17:18:04
|
Bugs item #3295448, was opened at 2011-04-30 13:18 Message generated for change (Tracker Item Submitted) made by belovedeagle You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101355&aid=3295448&group_id=1355 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: clisp Group: ANSI compliance issue Status: Open Resolution: None Priority: 5 Private: No Submitted By: belovedeagle (belovedeagle) Assigned to: Bruno Haible (haible) Summary: &whole binds wrong form Initial Comment: In both destructuring-bind forms and macro calls, twice-nested &whole variables bind to the wrong value: (destructuring-bind (a (&whole b c . (&whole d e . f)) . g) '(u (w x . y) . z) (list a b c d e f g)) => (u (w x . y) w (w x . y) x y z) (defmacro test (a (&whole b c . (&whole d e . f)) . g) (list a b c d e f g)) (macroexpand-1 '(test u (w x . y) . z)) => (u (w x . y) w (w x . y) x y z) but expected is: (u (w x . y) w (x . y) x y z) In the macroexpand-1 for the destructuring-bind form: (let ((system::<destructuring-form> '(u (w x . y) . z))) (if (not (system::list-length-in-bounds-p system::<destructuring-form> 2 2 t)) (system::destructuring-error system::<destructuring-form> '(2)) (let* ((a (car system::<destructuring-form>)) (#:g3375 (cadr system::<destructuring-form>)) (#:g3376 (if (not (system::list-length-in-bounds-p #:g3375 2 2 t)) (system::error-of-type 'ext:source-program-error :form system::<destructuring-form> :detail #:g3375 (system::text "~S: ~S does not match lambda list element ~:S") 'destructuring-bind #:g3375 '(&whole b c &whole d e . f)) #:g3375)) (b #:g3376) (c (car #:g3376)) (d #:g3376) (e (cadr #:g3376)) (f (cddr #:g3376)) (g (cddr system::<destructuring-form>))) (values a b c d e f g)))) d should be given the value (cdr #:g3376) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=101355&aid=3295448&group_id=1355 |