This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

"unsupported #!rest" compile-time error


Hello,

With a CVS pull from this morning I'm seeing a new compile-time error. I've attached an example.

Basically I have a method returning a lambda using the dotted notation:

  (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. I've pasted in what I'm seeing from the compiler at the end of my email.

Dean

----------------------------------------
% make PURE=1 default
rm -f *.class
CLASSPATH=.:~/kawa/cvs/kawa-pure-build/kawa-1.7.91.jar java kawa.repl --warn-undefined-variable --module-static-run --main -C rest.scm
(compiling rest.scm)
rest.scm:3:1: internal compile error - caught java.lang.RuntimeException:
unsupported #!rest type:ClassType java.lang.Object
java.lang.RuntimeException: unsupported #!rest type:ClassType java.lang.Object
at gnu.expr.Compilation.generateApplyMethodsWithoutContext(Compilation.java:1750)
at gnu.expr.LambdaExp.compileEnd(LambdaExp.java:506)
at gnu.expr.ClassExp.compile(ClassExp.java:396)
at gnu.expr.ClassInitializer.<init>(ClassInitializer.java:16)
at gnu.expr.ClassExp.compileSetField(ClassExp.java:570)
at gnu.expr.SetExp.compile(SetExp.java:144)
at gnu.expr.Expression.compileNotePosition(Expression.java:127)
at gnu.expr.Expression.compileWithPosition(Expression.java:98)
at gnu.kawa.functions.AppendValues.compile(AppendValues.java:49)
at gnu.expr.ApplyExp.compile(ApplyExp.java:167)
at gnu.expr.ApplyExp.compile(ApplyExp.java:117)
at gnu.expr.Expression.compileWithPosition(Expression.java:116)
at gnu.expr.LambdaExp.compileBody(LambdaExp.java:1419)
at gnu.expr.Compilation.addClass(Compilation.java:1892)
at gnu.expr.Compilation.compile(Compilation.java:915)
at gnu.expr.Compilation.compileToFiles(Compilation.java:953)
at kawa.lang.CompileFile.compile_to_files(CompileFile.java:70)
at kawa.repl.processArgs(repl.java:407)
at kawa.repl.main(repl.java:657)
make: *** [rest.class] Error 255
--- /dev/null	Tue Oct  7 04:48:06 2003
+++ rest.scm	Fri Jun 17 11:24:59 2005
@@ -0,0 +1,11 @@
+(module-static #t)
+
+(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))))))
+
+(let ((a :: <A> (make <A>)))
+  (let ((fn (invoke a 'get-op "hello")))
+    (fn 'a 'b 'c 'd)))

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]