typed_python icon indicating copy to clipboard operation
typed_python copied to clipboard

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

Open braxtonmckee opened this issue 3 years ago • 0 comments

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 avatar Jan 18 '23 23:01 braxtonmckee