From 361c36fb25c19db38497534c1709899a052e4b22 Mon Sep 17 00:00:00 2001 From: lyken Date: Tue, 4 Jun 2024 13:42:05 +0800 Subject: [PATCH] nac3core: add TopLevelComposer::new builtin check's assertion msg --- nac3core/src/toplevel/composer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nac3core/src/toplevel/composer.rs b/nac3core/src/toplevel/composer.rs index aa16e1f7..0064a6bc 100644 --- a/nac3core/src/toplevel/composer.rs +++ b/nac3core/src/toplevel/composer.rs @@ -105,7 +105,7 @@ impl TopLevelComposer { builtin_id.insert(name, DefinitionId(id)); } else if let TopLevelDef::Class { name, constructor, object_id, .. } = &*def { - assert_eq!(id, object_id.0); + assert_eq!(id, object_id.0, "Object id of class '{}' should match its index in builtin name list", name); if let Some(constructor) = constructor { builtin_ty.insert(*name, *constructor); } -- 2.44.2