From 08129cc635c7dea97f7ce9f303e8ad2baad997b7 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); }