Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@Function decorators don't work on closures defined in compiled code #415

Open
braxtonmckee opened this issue Jan 18, 2023 · 0 comments
Open
Labels
compiler Issue that does not affect the un-compiled subset of typed_python

Comments

@braxtonmckee
Copy link
Collaborator

We can't execute something like this:

@Entrypoint
def f():
    @Function
    def g():
        ...

because the compiler doesn't understand what to do with the @function decorator.

(a) that should work since its part of TP
(b) if we can see what the actual body of the function is, we should be able to actually execute the decorator
(c) if we don't know what to do, we can wrap it in 'object'. Maybe this should be configurable, although we don't have a conceptual framework for that idea yet anyways.

@braxtonmckee braxtonmckee added the compiler Issue that does not affect the un-compiled subset of typed_python label Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler Issue that does not affect the un-compiled subset of typed_python
Projects
None yet
Development

No branches or pull requests

1 participant