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.

Unsupported Recursive Behavior in Simulator Test Circuit #343

@ScottCarda-MS

Description

@ScottCarda-MS

There is a circuit defined in the simulation tests here: https://github.com/microsoft/qsharp-runtime/blob/master/src/Simulation/Simulators.Tests/Circuits/Recursion.qs#L42

function GenRecursionPartial<'T> (x : 'T, cnt : Int) : 'T {        
    if (cnt == 0) {
        return x;
    }
    else {
        let fct = GenRecursionPartial(_, cnt - 1);
        return fct(x);
    }
}

This should not be allowed as fct is capturing an unresolved generic reference to GenRecursionPartial. The reason why this is not throwing the appropriate error is a compiler bug and can be found here: microsoft/qsharp-compiler#574.

This test case should be removed, as it is not a supported scenario.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions