Opened 14 years ago
Last modified 12 years ago
#571 closed defect
merging rest-parameter in combination with inlining fails — at Version 1
Reported by: | felix winkelmann | Owned by: | felix winkelmann |
---|---|---|---|
Priority: | critical | Milestone: | 4.9.0 |
Component: | compiler | Version: | 4.6.x |
Keywords: | Cc: | ||
Estimated difficulty: |
Description (last modified by )
The following code causes a compile-time error. Somehow the calls to fail
are incorrectly modified for rest-parameter merging. The output should be "UNBOUND VARIABLE: (foo)", but it is "UNBOUND VARIABLE: foo". This happens with "-O1 -inline".
(define (lisp-eval x a bt) (fail bt "UNBOUND VARIABLE" x)) (define (lisp-apply fun args a bt) (let ((hd (car fun))) (case hd ((label) (if (= (length fun) 3) (let ((fo (caddr fun))) (lisp-apply fo args (cons (cons (cadr fun) fo) a) bt)) (fail bt "INVALID LABEL FORM" fun))) (else (lisp-apply (lisp-eval fun a bt) args a bt))))) (define (error-hook bt msg args) (error msg args)) (define (fail bt msg . args) (error-hook bt msg args)) (lisp-eval 'foo '() '())
Note: See
TracTickets for help on using
tickets.