This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: "unsupported #!rest" compile-time error
- From: Per Bothner <per at bothner dot com>
- To: Dean Ferreyra <dferreyra at igc dot org>
- Cc: "'Kawa List'" <kawa at sources dot redhat dot com>
- Date: Fri, 17 Jun 2005 12:28:02 -0700
- Subject: Re: "unsupported #!rest" compile-time error
- References: <42B319AA.6070605@igc.org>
Dean Ferreyra wrote:
I've reproduced this problem:
(define-simple-class <A> ()
((get-op name)
(lambda (arg1 . rest)
(display (format "arg1: ~A, rest: ~A~%" arg1 rest))
(display (format "comp: ~A~%" (cons name rest))))))
The compiler does not seem to like the cons of the method argument onto
the "rest" list.
It has nothing to do with the cons per se - it's the reference to name,
which means that we need to create a closure for the lambda.
The same happens with:
(define-simple-class <A> ()
((get-op name)
(lambda (arg1 . rest)
name)))
--
--Per Bothner
per@bothner.com http://per.bothner.com/