Skip to content

Disallow Apply parameter usage in Control-block initializers #1372

Description

@jonathan-dilorenzo

I believe we generally agreed that it is nonsense to use an apply parameter (i.e. one given to a control block on application) in the initialization of that control block, which should happen before the application. Like so:

control ingress(inout Headers h) {
    Headers h1 = h; // Happens before h is passed in?
    ...
}

Let's disallow it in the spec? Notably, it is important that it can still be used in actions e.g. (which I guess wouldn't get instantiated until they're applied with some parameter?) so the language may be a bit subtle.

@ChrisDodd, @KunJeong, @jaehyun1ee, @rcgoodfellow, and @ajwalton for visibility.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions