mirror of
https://github.com/pybind/pybind11.git
synced 2026-03-14 20:27:47 +00:00
Allow function pointer extraction from overloaded functions (#2944)
* Add a failure test for overloaded functions * Allow function pointer extraction from overloaded functions
This commit is contained in:
@@ -93,6 +93,10 @@ def test_cpp_function_roundtrip():
|
||||
m.test_dummy_function(m.roundtrip(m.dummy_function))
|
||||
== "matches dummy_function: eval(1) = 2"
|
||||
)
|
||||
assert (
|
||||
m.test_dummy_function(m.dummy_function_overloaded)
|
||||
== "matches dummy_function: eval(1) = 2"
|
||||
)
|
||||
assert m.roundtrip(None, expect_none=True) is None
|
||||
assert (
|
||||
m.test_dummy_function(lambda x: x + 2)
|
||||
|
||||
Reference in New Issue
Block a user