Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Formatter Updates Deprecated Specialization Declaration Parameters #1202

@ScottCarda-MS

Description

@ScottCarda-MS

The formatter should have a rule for updating the specialization declaration syntax, replacing the deprecated syntax for parameters with the supported syntax.

  • body () should be replaced with body (...).
  • adjoint () should be replaced with adjoint (...).
  • controlled (cs) should be replaced with controlled (cs, ...)
  • adjoint controlled (cs) should be replaced with adjoint controlled (cs, ...).

For example:

operation Foo () : Unit is Ctl + Adj {
    body () {
        // ...
    }
    adjoint () {
        // ...
    }
    controlled (q) {
        // ...
    }
    controlled adjoint (q) {
        // ...
    }
}

should be updated to

operation Foo () : Unit is Ctl + Adj {
    body (...) {
        // ...
    }
    adjoint (...) {
        // ...
    }
    controlled (q, ...) {
        // ...
    }
    controlled adjoint (q, ...) {
        // ...
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: formatterQ# source code formatterenhancementNew request or suggestion for an improvementhelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions