forked from alex-eg/sex
fix lambdas and add a test to prevent rotting
Lambdas rotted because there wasn't any test for them, and after return type moved to the end, lambdas stayed assumning it in the front. We fix this and add test program
This commit is contained in:
@@ -255,10 +255,10 @@
|
||||
|
||||
(define (make-aux-lambda-struct name form)
|
||||
(match form
|
||||
(('lambda ret-type arglist captures . body)
|
||||
(('lambda arglist ret-type captures . body)
|
||||
;; Captures are ignored for now, but
|
||||
;; we'll need them for TODO: closures support
|
||||
(process-fn (copy-form-source! form `(fn ,ret-type ,name ,arglist ,@body))
|
||||
(process-fn (copy-form-source! form `(fn ,name ,arglist ,ret-type ,@body))
|
||||
(list)))
|
||||
(else (sex-error form "malformed lambda" form))))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user