diff --git a/furvm/src/function.cpp b/furvm/src/function.cpp index 4d1ca25..ac74dc8 100644 --- a/furvm/src/function.cpp +++ b/furvm/src/function.cpp @@ -17,6 +17,10 @@ function::function(function&& other) noexcept case function_t::Native: { new (&m_value.native) native_function(std::move(other.m_value.native)); } break; + case function_t::Import: { + m_value.imp.mod = other.m_value.imp.mod; + m_value.imp.function = other.m_value.imp.function; + } break; } other.m_value.position = 0; } @@ -34,10 +38,14 @@ function& function::operator=(function&& other) noexcept { case function_t::Native: { new (&m_value.native) native_function(std::move(other.m_value.native)); } break; + case function_t::Import: { + m_value.imp.mod = other.m_value.imp.mod; + m_value.imp.function = other.m_value.imp.function; + } break; } other.m_value.position = 0; return *this; } -} // namespace furvm \ No newline at end of file +} // namespace furvm