From a6bd6d5567964836fbbdc7c7b7c5e118d3d6fd28 Mon Sep 17 00:00:00 2001 From: z78078 Date: Wed, 20 Jul 2022 16:49:04 +0800 Subject: [PATCH] nac3core: src/toplevel/composer.rs fix the constructor propagation bug in function build_constructor_lookup --- 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 885173c2..570cac1d 100644 --- a/nac3core/src/toplevel/composer.rs +++ b/nac3core/src/toplevel/composer.rs @@ -196,7 +196,7 @@ impl TopLevelComposer { let mut current_class = class.clone(); while let Some(base) = base_class_lookup.get(current_class) { if let Some(cons) = constructor_lookup.get(base) { - self.constructor_lookup.insert(*current_class, cons.clone()); + self.constructor_lookup.insert(**class, cons.clone()); break; } else { current_class = base;