aboutsummaryrefslogtreecommitdiffstats
path: root/compiler/compile.c
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-10-18 18:25:17 +0100
committereunhhu <[email protected]>2026-10-18 18:25:17 +0100
commit3d7765e116c7852c63237bf25dbfb785843de916 (patch)
treee1e92682f54c40cb0b246d45e498d42c7c750f8f /compiler/compile.c
parent7ed02ca2a553fb34e0ef22fe7fc98353e1f9ffe7 (diff)
downloadaup-3d7765e116c7852c63237bf25dbfb785843de916.tar.gz
aup-3d7765e116c7852c63237bf25dbfb785843de916.zip
A message's rows hold lists (Pure 027's 4a): a record holding lists is a message's rows as a let's, a stored and a transient list's; appending into the list of a message's row is refused (a message's rows are read alone), its diagnostic saying so; diagnostic 37 now that one
Diffstat (limited to 'compiler/compile.c')
-rw-r--r--compiler/compile.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/compiler/compile.c b/compiler/compile.c
index aa489b9..7284414 100644
--- a/compiler/compile.c
+++ b/compiler/compile.c
@@ -4727,7 +4727,7 @@ static void statements(Compiler *c, const Stmt *s) {
fail_at(c, s->first->line, s->first->column, "'%s' is not a list in a field", path);
if (c->state_bound[list] || c->state_rows[list])
fail_at(c, s->first->line, s->first->column, "a list in a field changes in an item of a let's, a stored or a "
- "transient list, not of one read from a record");
+ "transient list, not of a message's rows or one read from a record");
view_changes(c, s, list, c->state_names[list]);
const Record *inner = &c->records[r->field_record[field]];
const Expr *values[FIELDS_PER_RECORD];
@@ -5371,10 +5371,6 @@ static void generate(Compiler *c, unsigned char **module, size_t *size) {
if (record < 0)
fail_at(c, c->state_line[i], c->state_column[i], "a list holds a record; '%s' is not one", c->state_target[i]);
state_ref[i] = (uint32_t)record;
- for (unsigned k = 0; k < c->records[record].fields && c->state_rows[i]; ++k)
- if (c->records[record].field_kinds[k] == LIST) /* (027's 2b and 3) */
- fail_at(c, c->state_line[i], c->state_column[i], "'%s' holds lists in its items: a message's rows do not, "
- "for now (lets', stored and transient lists do)", c->state_names[i]);
if (*c->state_key[i]) {
const Record *r = &c->records[record];
c->list_key[i] = 1 + (int)record_field(c, r, c->state_key[i], c->state_key_line[i], c->state_key_column[i]);