Issue #404 - Do not require all fields to be listed in constructor

This commit is contained in:
Justin Ethier 2021-07-19 16:56:06 -04:00
parent b06e914e6d
commit c58a9927ae
2 changed files with 5 additions and 1 deletions

View file

@ -9,6 +9,7 @@ Bug Fixes
- Properly escape question marks within strings in generated C code to avoid trigraphs.
- Eliminate clang compiler warnings referencing `EOF` when building the runtime.
- Fixed code so that the C compiler will no longer generate warnings regarding the string comparisons in `Cyc_st_add`. Previously this could result in these warnings being spammed to the console when compiling code using Cyclone.
- Allow a record type to contain fields that are not initialized by the constructor.
## 0.30.0 - July 2, 2021

View file

@ -2115,7 +2115,10 @@
(make-record-marker)
(quote ,name)
(,(rename 'vector)
,@make-fields))))
,@make-fields ;; Pass field values sent to constructor
,@(make-list ;; And include empty slots for any other fields
(- (length (cddddr expr))
(length make-fields))) ))))
)))))
(define-syntax define-values