From ca37219affe58bc3372a9292b685ba5f0d446fd9 Mon Sep 17 00:00:00 2001 From: Lee Dogeon Date: Fri, 27 Aug 2021 23:07:10 +0900 Subject: [PATCH] Fix `__repr__`, `__qualname__` (#2977) --- src/compile.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compile.rs b/src/compile.rs index db33c5b..fb09e53 100644 --- a/src/compile.rs +++ b/src/compile.rs @@ -1021,8 +1021,8 @@ impl Compiler { }; let qualified_name = self.create_qualified_name(name, ""); - let old_qualified_path = self.current_qualified_path.take(); - self.current_qualified_path = Some(self.create_qualified_name(name, ".")); + let old_qualified_path = self.current_qualified_path.replace(qualified_name.clone()); + self.current_qualified_path = Some(self.create_qualified_name("", "")); let (body, doc_str) = get_doc(body);