From bbac513aa9baf7de463c5f43239398ac00bf57df Mon Sep 17 00:00:00 2001 From: Karma Riuk Date: Mon, 7 Jul 2025 15:01:46 +0200 Subject: [PATCH] checkign that the casting of the let statement doesn't throw --- test/parser.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/parser.cpp b/test/parser.cpp index 08789b4..ea46c4e 100644 --- a/test/parser.cpp +++ b/test/parser.cpp @@ -10,7 +10,8 @@ void test_let_statement(ast::statement* stmt, const std::string name) { REQUIRE(stmt->token_literal() == "let"); - ast::let* let_stmt = dynamic_cast(stmt); + ast::let* let_stmt; + REQUIRE_NOTHROW(let_stmt = dynamic_cast(stmt)); REQUIRE_MESSAGE( let_stmt != nullptr, "Couldn't cast statement to a let statement"