nac3core: add TopLevelComposer::new builtin check's assertion msg
This commit is contained in:
parent
fa8af37e84
commit
361c36fb25
|
@ -105,7 +105,7 @@ impl TopLevelComposer {
|
||||||
builtin_id.insert(name, DefinitionId(id));
|
builtin_id.insert(name, DefinitionId(id));
|
||||||
} else if let TopLevelDef::Class { name, constructor, object_id, .. } = &*def
|
} 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 {
|
if let Some(constructor) = constructor {
|
||||||
builtin_ty.insert(*name, *constructor);
|
builtin_ty.insert(*name, *constructor);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue