diff --git a/src/bytecode/vm/Stack.h b/src/bytecode/vm/Stack.h index 0ea7a0e..736448c 100644 --- a/src/bytecode/vm/Stack.h +++ b/src/bytecode/vm/Stack.h @@ -117,11 +117,11 @@ namespace Bytecode { } StackObject top() { - uint8_t type = *(stackTop - 1); - if (!used) return StackObject{}; + uint8_t type = *(stackTop - 1); + StackObject object{}; size_t size; diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index e230df8..503af69 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -28,8 +28,7 @@ file( ./*.cpp ) -add_executable(all_tests ${SRCS} - variables_test.cpp) +add_executable(all_tests ${SRCS}) target_link_libraries(all_tests GTest::gtest_main GTest::gmock_main)