mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-20 06:09:18 +02:00
Need to set return type for zero-argument constructors.
This commit is contained in:
parent
6fa22a8cb0
commit
12e18c9997
1 changed files with 5 additions and 3 deletions
|
@ -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"))
|
||||
|
|
Loading…
Add table
Reference in a new issue