diff --git a/src/nb_func.cpp b/src/nb_func.cpp index c7f87a64..69162f59 100644 --- a/src/nb_func.cpp +++ b/src/nb_func.cpp @@ -453,9 +453,8 @@ PyObject *nb_func_new(const void *in_) noexcept { noargs_ok = false; break; } - if (noargs_ok) { + if (noargs_ok) td->flags |= (uint32_t) type_flags::has_nullary_new; - } } } else if (is_new) { td->init = func;