diff --git a/tests/test_pytypes.cpp b/tests/test_pytypes.cpp index 40faad17c..792785baa 100644 --- a/tests/test_pytypes.cpp +++ b/tests/test_pytypes.cpp @@ -1049,7 +1049,8 @@ TEST_SUBMODULE(pytypes, m) { auto static_class = py::class_(m, "Static"); static_class.def(py::init()); static_class.attr_with_type_hint>("x") = 1.0; - static_class.attr_with_type_hint>>("dict_str_int") + static_class.attr_with_type_hint>>( + "dict_str_int") = py::dict(); struct Instance {};