Need to set return type for zero-argument constructors.

This commit is contained in:
Alex Shinn 2012-01-15 21:28:41 +09:00
parent 6fa22a8cb0
commit 12e18c9997

View file

@ -1091,9 +1091,10 @@
(if default (write-default default) "")
");\n"
(cond
((and (pair? (func-c-args func))
((or (not (eq? 'sexp (type-base (func-ret-type func))))
(and (pair? (func-c-args func))
(any (lambda (a) (not (eq? 'sexp (type-base a))))
(func-c-args func)))
(func-c-args func))))
(lambda ()
(cat
" if (sexp_opcodep(op)) {\n"
@ -1104,6 +1105,7 @@
(i 1 (+ i 1)))
((null? ls))
(cond
((eq? 'sexp (type-base (car ls))))
((<= i 3)
(cat " sexp_opcode_arg" i "_type(op) = "
(type-id-init-value (car ls)) ";\n"))