summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2024-09-30 19:06:37 -0700
committerKaz Kylheku <kaz@kylheku.com>2024-09-30 19:06:37 -0700
commite46abe3ec8b59826842dd5cc9ac3b5381240ec95 (patch)
tree83167a80b760644e6a06f41aeb167bddead3ad10
parent62cb694d18e211364d664618a705fc6b96a45c51 (diff)
downloadtxr-e46abe3ec8b59826842dd5cc9ac3b5381240ec95.tar.gz
txr-e46abe3ec8b59826842dd5cc9ac3b5381240ec95.tar.bz2
txr-e46abe3ec8b59826842dd5cc9ac3b5381240ec95.zip
refset, replace: adjust diagnostic for unsupported object.
* lib.c (refset, replace): Word the bad object diagnostic in terms of it not being a modifiable sequence. This covers cases when the object is something abstractly iterable, like a range. We don't want to say that it's not a sequence.
-rw-r--r--lib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib.c b/lib.c
index e38197ee..5a47d19d 100644
--- a/lib.c
+++ b/lib.c
@@ -13564,7 +13564,7 @@ val refset(val seq, val ind, val newval)
}
/* fallthrough */
default:
- type_mismatch(lit("refset: ~s is not a sequence"), seq, nao);
+ type_mismatch(lit("refset: ~s is not a modifiable sequence"), seq, nao);
}
return newval;
}
@@ -13593,7 +13593,7 @@ val replace(val seq, val items, val from, val to)
return replace_obj(seq, items, from, to);
/* fallthrough */
default:
- type_mismatch(lit("~a: ~s is not a sequence"), self, seq, nao);
+ type_mismatch(lit("~a: ~s is not a modifiable sequence"), self, seq, nao);
}
}