We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8315bc5 + e6c62e5 commit 6e5595eCopy full SHA for 6e5595e
src/lpython/semantics/python_ast_to_asr.cpp
@@ -894,14 +894,13 @@ class CommonVisitor : public AST::BaseVisitor<Struct> {
894
}
895
896
int64_t find_argument_position_from_name(ASR::StructType_t* orig_struct, std::string arg_name) {
897
- int64_t arg_position = -1;
898
for( size_t i = 0; i < orig_struct->n_members; i++ ) {
899
std::string original_arg_name = std::string(orig_struct->m_members[i]);
900
if( original_arg_name == arg_name ) {
901
return i;
902
903
904
- return arg_position;
+ return -1;
905
906
907
void visit_expr_list(AST::expr_t** pos_args, size_t n_pos_args,
0 commit comments