fix 0-field prefab immutability flag
Closes PR 11777
This commit is contained in:
parent
95b5c49b9b
commit
733eab5805
|
@ -1052,6 +1052,7 @@
|
|||
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Prefab
|
||||
|
||||
(test #t struct? (readstr "#s(v)"))
|
||||
(test #t struct? (readstr "#s(v 1)"))
|
||||
(test #t struct? (readstr "#s((v 1) 1)"))
|
||||
(test #t struct? (readstr "#s((v 1 #()) 1)"))
|
||||
|
@ -1078,6 +1079,8 @@
|
|||
(and (exn:fail:read? x)
|
||||
(not (exn:fail:read:eof? x)))))
|
||||
|
||||
(test #t struct? (syntax-e (read-syntax 'string (open-input-string "#s(v)"))))
|
||||
|
||||
;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; read-language
|
||||
|
||||
|
|
|
@ -3929,7 +3929,7 @@ static void struct_type_set_if_immutable(Scheme_Struct_Type *struct_type) {
|
|||
size = struct_type->num_islots;
|
||||
if (struct_type->name_pos)
|
||||
size -= struct_type->parent_types[struct_type->name_pos - 1]->num_islots;
|
||||
if (struct_type->immutables) {
|
||||
if (!size || struct_type->immutables) {
|
||||
for (i = 0; i < size; i++) {
|
||||
if (!struct_type->immutables[i])
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue
Block a user