From 305494c4b249af8643d1f1315afed0e65033abf1 Mon Sep 17 00:00:00 2001 From: Michael Hansen Date: Thu, 1 Dec 2022 16:03:09 -0800 Subject: [PATCH] Fix unintentional method shadowing in ASTAnnotatedVar --- ASTNode.h | 2 +- ASTree.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ASTNode.h b/ASTNode.h index e1a05bc..3a30814 100644 --- a/ASTNode.h +++ b/ASTNode.h @@ -694,7 +694,7 @@ public: : ASTNode(NODE_ANNOTATED_VAR), m_name(std::move(name)), m_type(std::move(type)) { } PycRef name() const noexcept { return m_name; } - PycRef type() const noexcept { return m_type; } + PycRef annotation() const noexcept { return m_type; } private: PycRef m_name; diff --git a/ASTree.cpp b/ASTree.cpp index f679b49..90c79e1 100644 --- a/ASTree.cpp +++ b/ASTree.cpp @@ -3305,11 +3305,11 @@ void print_src(PycRef node, PycModule* mod) { PycRef annotated_var = node.cast(); PycRef name = annotated_var->name().cast(); - PycRef type = annotated_var->type(); + PycRef annotation = annotated_var->annotation(); fputs(name->object().cast()->value(), pyc_output); fputs(": ", pyc_output); - print_src(type, mod); + print_src(annotation, mod); } break; case ASTNode::NODE_TERNARY: