diff --git a/mlx/compile.cpp b/mlx/compile.cpp index 44bab0298..9bfdb6ee9 100644 --- a/mlx/compile.cpp +++ b/mlx/compile.cpp @@ -913,7 +913,7 @@ std::function(const std::vector&)> compile( auto pfun = std::shared_ptr< std::function(const std::vector&)>>( new std::function(const std::vector&)>{fun}, - [](auto p) { + [](auto* p) { detail::compile_erase(reinterpret_cast(p)); delete p; });