You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Within def functions I expect to be able to pass function pointers around without type hints just as I would in python. If the functions have no arguments, this works fine. But passing a function that has arguments to another function currently fails, unless you add type hints.
Steps to reproduce
Here is a minimal reproducing example, the call to bar within main errors with: invalid call to 'bar': argument #0 cannot be converted from 'fn(owned s: object) raises -> object' to 'object'mojo
Bug description
Within
def
functions I expect to be able to pass function pointers around without type hints just as I would in python. If the functions have no arguments, this works fine. But passing a function that has arguments to another function currently fails, unless you add type hints.Steps to reproduce
Here is a minimal reproducing example, the call to
bar
withinmain
errors with:invalid call to 'bar': argument #0 cannot be converted from 'fn(owned s: object) raises -> object' to 'object'mojo
System information
The text was updated successfully, but these errors were encountered: