Open kabra1110 opened 1 year ago
from lpython import i32 def test_str_repeat(): i: i32 = 10 s: str = 'a' print(s * i) test_str_repeat()
This gives a compiler error, occurring here
right_int = ASR::down_cast<ASR::IntegerConstant_t>( ASRUtils::expr_value(right))->m_n;
An assertion to check non-nullptr in down_cast fails.
down_cast
It's assuming that "i" is a compile time constant, but it's a variable in this case.
I did try changing the code to use Integer_t instead, but the issue appears to be it being a nullptr.
Integer_t
nullptr
This gives a compiler error, occurring here
An assertion to check non-nullptr in
down_cast
fails.