Skip to content

[Feature Request] Warn when unserializable values are returned from a view function #17176

@vineethk

Description

@vineethk

🚀 Feature Request

The following code returns invariant violation error, because the return value (anonymous closure) is not serializable.

#[view]
public fun dummy_view(): || {
    || {}
}

Instead, a compiler warning should be given if we can detect view functions that return unserializable values.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions