Skip to content

How to constrain arguments cannot be anonymous function at compile time #1798

Closed
@Silentdoer

Description

@Silentdoer

for example:

void submit(Function task) {
}

Task is not allowed to be an anonymous function, because it does not have a static lifecycle, so it cannot be sent to other isolates, So how do we prevent users from using anonymous functions at compile time?

Metadata

Metadata

Assignees

No one assigned

    Labels

    requestRequests to resolve a particular developer problem

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions