Fix unintentional method shadowing in ASTAnnotatedVar
This commit is contained in:
@@ -694,7 +694,7 @@ public:
|
||||
: ASTNode(NODE_ANNOTATED_VAR), m_name(std::move(name)), m_type(std::move(type)) { }
|
||||
|
||||
PycRef<ASTNode> name() const noexcept { return m_name; }
|
||||
PycRef<ASTNode> type() const noexcept { return m_type; }
|
||||
PycRef<ASTNode> annotation() const noexcept { return m_type; }
|
||||
|
||||
private:
|
||||
PycRef<ASTNode> m_name;
|
||||
|
@@ -3305,11 +3305,11 @@ void print_src(PycRef<ASTNode> node, PycModule* mod)
|
||||
{
|
||||
PycRef<ASTAnnotatedVar> annotated_var = node.cast<ASTAnnotatedVar>();
|
||||
PycRef<ASTObject> name = annotated_var->name().cast<ASTObject>();
|
||||
PycRef<ASTNode> type = annotated_var->type();
|
||||
PycRef<ASTNode> annotation = annotated_var->annotation();
|
||||
|
||||
fputs(name->object().cast<PycString>()->value(), pyc_output);
|
||||
fputs(": ", pyc_output);
|
||||
print_src(type, mod);
|
||||
print_src(annotation, mod);
|
||||
}
|
||||
break;
|
||||
case ASTNode::NODE_TERNARY:
|
||||
|
Reference in New Issue
Block a user