@@ -391,21 +391,20 @@ struct PythonIntrinsicProcedures {
391
391
return arg;
392
392
} else if (ASRUtils::is_character (*type)) {
393
393
ASR::ttype_t *list_type = ASRUtils::TYPE (ASR::make_List_t (al, loc, str_type));
394
- if (ASRUtils::expr_value (arg) != nullptr ) {
395
- std::string c = ASR::down_cast<ASR::StringConstant_t>(arg)->m_s ;
396
- Vec<ASR::expr_t *> list;
397
- list.reserve (al, c.length ());
398
- std::string r;
399
- for (size_t i=0 ; i<c.length (); i++) {
400
- r.push_back (char (c[i]));
401
- list.push_back (al, ASR::down_cast<ASR::expr_t >(
402
- ASR::make_StringConstant_t (al, loc, s2c (al, r),
403
- str_type)));
404
- r.pop_back ();
405
- }
406
- return ASR::down_cast<ASR::expr_t >(ASR::make_ListConstant_t (al, loc, list.p ,
407
- list.size (), list_type));
394
+ LFORTRAN_ASSERT (ASRUtils::expr_value (arg) != nullptr )
395
+ std::string c = ASR::down_cast<ASR::StringConstant_t>(arg)->m_s ;
396
+ Vec<ASR::expr_t *> list;
397
+ list.reserve (al, c.length ());
398
+ std::string r;
399
+ for (size_t i=0 ; i<c.length (); i++) {
400
+ r.push_back (char (c[i]));
401
+ list.push_back (al, ASR::down_cast<ASR::expr_t >(
402
+ ASR::make_StringConstant_t (al, loc, s2c (al, r),
403
+ str_type)));
404
+ r.pop_back ();
408
405
}
406
+ return ASR::down_cast<ASR::expr_t >(ASR::make_ListConstant_t (al, loc, list.p ,
407
+ list.size (), list_type));
409
408
} else {
410
409
throw SemanticError (" '" + ASRUtils::type_to_str_python (type) +
411
410
" ' object conversion to List is not implemented " ,
0 commit comments