doc: expand an error message about compacting closures (#3627)

Provide a hint of where the error message may come from.
This commit is contained in:
Patrick Massot 2024-03-07 15:02:23 -05:00 committed by GitHub
parent f336525f31
commit ccac989dda
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -342,7 +342,7 @@ void object_compactor::operator()(object * o) {
g_tag_counters[lean_ptr_tag(curr)]++;
#endif
switch (lean_ptr_tag(curr)) {
case LeanClosure: lean_internal_panic("closures cannot be compacted");
case LeanClosure: lean_internal_panic("closures cannot be compacted. One possible cause of this error is trying to store a function in a persistent environment extension.");
case LeanArray: r = insert_array(curr); break;
case LeanScalarArray: insert_sarray(curr); break;
case LeanString: insert_string(curr); break;