Skip to content

Commit 676812b

Browse files
Add support for looking up binary methods
1 parent 491af05 commit 676812b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

python/egglog/runtime.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,8 @@ def resolve_callable(callable: object) -> tuple[CallableRef, Declarations]:
695695
):
696696
raise NotImplementedError(f"Can only turn constants or classvars into callable refs, not {expr}")
697697
return expr.callable, decl_thunk()
698+
case types.MethodWrapperType() if isinstance((slf := callable.__self__), RuntimeClass):
699+
return MethodRef(slf.__egg_tp__.name, callable.__name__), slf.__egg_decls__
698700
case _:
699701
raise NotImplementedError(f"Cannot turn {callable} of type {type(callable)} into a callable ref")
700702

0 commit comments

Comments
 (0)