Skip to content

Commit

Permalink
cast: Cosmetic change
Browse files Browse the repository at this point in the history
  • Loading branch information
HaoZeke committed Aug 13, 2021
1 parent a8684bf commit 639388b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lfortran/semantics/asr_implicit_cast_rules.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@ class ImplicitCastRules {
LFORTRAN_ASSERT(ASR::is_a<ASR::Integer_t>(*ASRUtils::expr_type(*convert_can)))
value = ASRUtils::expr_value(*convert_can);
if (ASR::is_a<ASR::ConstantInteger_t>(*value)) {
ASR::ConstantInteger_t *i = ASR::down_cast<ASR::ConstantInteger_t>(value);
double rval = static_cast<double>(i->m_n);
value = (ASR::expr_t *)ASR::make_ConstantReal_t(al, a_loc,
rval, dest_type);
ASR::ConstantInteger_t *i = ASR::down_cast<ASR::ConstantInteger_t>(value);
double rval = static_cast<double>(i->m_n);
value = (ASR::expr_t *)ASR::make_ConstantReal_t(al, a_loc,
rval, dest_type);
} else {
// TODO: Handle cases where this is say, a constant Array
// See https://gitlab.com/lfortran/lfortran/-/merge_requests/1162#note_647992506
Expand Down

0 comments on commit 639388b

Please sign in to comment.