diff --git a/src/lpython/semantics/python_ast_to_asr.cpp b/src/lpython/semantics/python_ast_to_asr.cpp index 63c87dbe4a..910735498f 100644 --- a/src/lpython/semantics/python_ast_to_asr.cpp +++ b/src/lpython/semantics/python_ast_to_asr.cpp @@ -2927,6 +2927,9 @@ class CommonVisitor : public AST::BaseVisitor { if( !init_expr ) { tmp = nullptr; if (x.m_value) { + if (AST::is_a(*x.m_value)) { + throw SemanticError("f-strings are not implemented yet", x.m_value->base.loc); + } this->visit_expr(*x.m_value); } else { if (ASR::is_a(*type)) { @@ -7247,6 +7250,8 @@ class BodyVisitor : public CommonVisitor { AST::Call_t *c = AST::down_cast(x.m_value); visit_Call(*c); return; + } else if (AST::is_a(*x.m_value)) { + throw SemanticError("f-strings are not implemented yet", x.m_value->base.loc); } this->visit_expr(*x.m_value);