Skip to content

Report error on empty array return #3379

Description

@amcasey

Describe the bug

An empty array result isn't allowed and we could detect it at compile time.

To Reproduce

Steps to reproduce the behavior:

Generate QIR for

operation Main() : Int[] {
    use q = Qubit();
    MResetZ(q);
    []
}

Expected behavior

An error is reported

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions