From 82d6d4bd2f02cf5ec349bb5f9f516db79f3160a7 Mon Sep 17 00:00:00 2001 From: Christopher Jefferson Date: Fri, 1 Mar 2024 00:44:04 +0800 Subject: [PATCH] Skip checking DATOBJ when retyping bag (#5661) --- src/bags.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/bags.c b/src/bags.c index c4887784c1..74ba1a6b01 100644 --- a/src/bags.c +++ b/src/bags.c @@ -46,6 +46,11 @@ void PrecheckRetypeBag(Bag bag, UInt new_type) return; #endif + // Some GAP code and packages (including EDIM) produce invalid + // T_DATOBJ objects without correct type info, so skip T_DATOBJ for now + if (IS_DATOBJ(bag)) + return; + #ifndef HPCGAP // HACK: when using `DeclareGlobalVariable`, the placeholder object of // type `IsToBeDefinedObj` is immutable, while `InstallValue` also