Skip to content

Commit b33d06f

Browse files
Skylion007rwgk
andauthored
bugfix: fixes a test suite bug in the __new__ example (#4698)
* bugfix: fixes a test suite bug in the __new__ example * See #4698 (comment) --------- Co-authored-by: Ralf W. Grosse-Kunstleve <[email protected]>
1 parent 2e5f5c4 commit b33d06f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_class.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ TEST_SUBMODULE(class_, m) {
8585
.def_static("new_instance", &NoConstructor::new_instance, "Return an instance");
8686

8787
py::class_<NoConstructorNew>(m, "NoConstructorNew")
88-
.def(py::init([](const NoConstructorNew &self) { return self; })) // Need a NOOP __init__
88+
.def(py::init([]() { return nullptr; })) // Need a NOOP __init__
8989
.def_static("__new__",
9090
[](const py::object &) { return NoConstructorNew::new_instance(); });
9191

0 commit comments

Comments
 (0)