@@ -572,7 +572,7 @@ class CommonVisitor : public AST::BaseVisitor<StructType> {
572
572
} else {
573
573
sym = es_s;
574
574
}
575
- return ASRUtils::TYPE ( ASRUtils:: make_StructType_t_util (al, loc, sym) );
575
+ return ASRUtils::make_StructType_t_util (al, loc, sym);
576
576
}
577
577
default : {
578
578
return return_type;
@@ -841,7 +841,7 @@ class CommonVisitor : public AST::BaseVisitor<StructType> {
841
841
ASR::symbol_t *der_sym = ASRUtils::symbol_get_past_external (s);
842
842
if ( der_sym ) {
843
843
if ( ASR::is_a<ASR::Struct_t>(*der_sym) ) {
844
- type = ASRUtils::TYPE ( ASRUtils:: make_StructType_t_util (al, loc, s) );
844
+ type = ASRUtils::make_StructType_t_util (al, loc, s);
845
845
type = ASRUtils::make_Array_t_util (al, loc, type, dims.p , dims.size (), abi, is_argument);
846
846
} else if ( ASR::is_a<ASR::Enum_t>(*der_sym) ) {
847
847
type = ASRUtils::TYPE (ASR::make_EnumType_t (al, loc, s));
@@ -1307,7 +1307,7 @@ class CommonVisitor : public AST::BaseVisitor<StructType> {
1307
1307
if ( n_kwargs>0 ) {
1308
1308
throw SemanticError (" Keyword args are not supported" , loc);
1309
1309
}
1310
- ASR::ttype_t * der_type = ASRUtils::TYPE ( ASRUtils:: make_StructType_t_util (al, loc, stemp) );
1310
+ ASR::ttype_t * der_type = ASRUtils::make_StructType_t_util (al, loc, stemp);
1311
1311
return ASR::make_StructConstructor_t (al, loc, stemp, args.p ,
1312
1312
args.size (), der_type, nullptr );
1313
1313
}
@@ -1342,7 +1342,7 @@ class CommonVisitor : public AST::BaseVisitor<StructType> {
1342
1342
for (size_t i = args.size (); i < st->n_members ; i++) {
1343
1343
args.push_back (al, st->m_initializers [i]);
1344
1344
}
1345
- ASR::ttype_t * der_type = ASRUtils::TYPE ( ASRUtils:: make_StructType_t_util (al, loc, stemp) );
1345
+ ASR::ttype_t * der_type = ASRUtils::make_StructType_t_util (al, loc, stemp);
1346
1346
return ASR::make_StructConstructor_t (al, loc, stemp, args.p , args.size (), der_type, nullptr );
1347
1347
} else if ( ASR::is_a<ASR::Enum_t>(*s) ) {
1348
1348
Vec<ASR::expr_t *> args_new;
@@ -1955,7 +1955,7 @@ class CommonVisitor : public AST::BaseVisitor<StructType> {
1955
1955
" str annotation" , loc);
1956
1956
}
1957
1957
// TODO: Change the returned type from Class to StructType
1958
- return ASRUtils::TYPE ( ASRUtils:: make_StructType_t_util (al, loc, sym, false ) );
1958
+ return ASRUtils::make_StructType_t_util (al, loc, sym, false );
1959
1959
}
1960
1960
1961
1961
throw SemanticError (" Only Name, Subscript, and Call supported for now in annotation of annotated assignment." , loc);
@@ -3485,7 +3485,7 @@ class CommonVisitor : public AST::BaseVisitor<StructType> {
3485
3485
std::string self_name = x.m_args .m_args [0 ].m_arg ;
3486
3486
ASR::symbol_t * sym = current_scope->get_symbol (self_name);
3487
3487
ASR::Variable_t* self_var = ASR::down_cast<ASR::Variable_t>(sym);
3488
- self_var->m_type = ASRUtils::TYPE ( ASRUtils:: make_StructType_t_util (al,loc, class_sym) );
3488
+ self_var->m_type = ASRUtils::make_StructType_t_util (al,loc, class_sym);
3489
3489
current_scope = parent_scope;
3490
3490
}
3491
3491
@@ -5361,7 +5361,7 @@ class BodyVisitor : public CommonVisitor<BodyVisitor> {
5361
5361
first_arg.loc = loc;
5362
5362
ASR::symbol_t * self_sym = current_scope->get_symbol (" self" );
5363
5363
first_arg.m_value = ASRUtils::EXPR (ASR::make_Var_t (al,loc,self_sym));
5364
- ASR::ttype_t * target_type = ASRUtils::TYPE ( ASRUtils:: make_StructType_t_util (al,loc,parent_sym) );
5364
+ ASR::ttype_t * target_type = ASRUtils::make_StructType_t_util (al,loc,parent_sym);
5365
5365
cast_helper (target_type, first_arg.m_value , x.base .base .loc , true );
5366
5366
Vec<ASR::call_arg_t > args_w_first; args_w_first.reserve (al,1 );
5367
5367
args_w_first.push_back (al, first_arg);
@@ -6354,7 +6354,7 @@ class BodyVisitor : public CommonVisitor<BodyVisitor> {
6354
6354
s2c (al, struct_member_name), ASR::accessType::Public));
6355
6355
current_scope->add_symbol (import_name, import_struct_member);
6356
6356
}
6357
- member_var_type = ASRUtils::TYPE ( ASRUtils:: make_StructType_t_util (al, loc, import_struct_member) );
6357
+ member_var_type = ASRUtils::make_StructType_t_util (al, loc, import_struct_member);
6358
6358
}
6359
6359
}
6360
6360
}
@@ -6458,7 +6458,7 @@ class BodyVisitor : public CommonVisitor<BodyVisitor> {
6458
6458
" found in " + std::string (der_type->m_name ),
6459
6459
loc);
6460
6460
} else if ( !member_found && der_type->m_parent ) {
6461
- ASR::ttype_t * parent_type = ASRUtils::TYPE ( ASRUtils:: make_StructType_t_util (al, loc,der_type->m_parent ) );
6461
+ ASR::ttype_t * parent_type = ASRUtils::make_StructType_t_util (al, loc,der_type->m_parent );
6462
6462
visit_AttributeUtil (parent_type,attr_char,t,loc);
6463
6463
return ;
6464
6464
}
@@ -6495,7 +6495,7 @@ class BodyVisitor : public CommonVisitor<BodyVisitor> {
6495
6495
s2c (al, struct_member_name), ASR::accessType::Public));
6496
6496
current_scope->add_symbol (import_name, import_struct_member);
6497
6497
}
6498
- member_var_type = ASRUtils::TYPE ( ASRUtils:: make_StructType_t_util (al, loc, import_struct_member) );
6498
+ member_var_type = ASRUtils::make_StructType_t_util (al, loc, import_struct_member);
6499
6499
}
6500
6500
}
6501
6501
}
0 commit comments