Skip to content

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

Open
@braxtonmckee

Description

@braxtonmckee

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    compilerIssue that does not affect the un-compiled subset of typed_python

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions