Add is_final to disallow inheritance from Python
- Not currently supported on PyPy
diff --git a/tests/test_class.cpp b/tests/test_class.cpp
index 499d0cc..128bc39 100644
--- a/tests/test_class.cpp
+++ b/tests/test_class.cpp
@@ -367,6 +367,14 @@
.def(py::init<>())
.def("ptr", &Aligned::ptr);
#endif
+
+ // test_final
+ struct IsFinal final {};
+ py::class_<IsFinal>(m, "IsFinal", py::is_final());
+
+ // test_non_final_final
+ struct IsNonFinalFinal {};
+ py::class_<IsNonFinalFinal>(m, "IsNonFinalFinal", py::is_final());
}
template <int N> class BreaksBase { public: virtual ~BreaksBase() = default; };