Closed ScottCarda-MS closed 4 years ago
If the compiler behavior is changed according to microsoft/qsharp-compiler#574, instead of removing the test case, would another option be to change GenRecursionPartial(_, cnt - 1)
to GenRecursionPartial<'T>(_, cnt - 1)
to explicitly resolve the type variable?
Hmm, yes I think that would solve the issue well. I had thought at first that the purpose of these tests was to test the type argument inference, but now I don't think that's the case, so the test would still be useful to its purpose if given the type argument explicitly.
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
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: https://github.com/microsoft/qsharp-compiler/issues/574.This test case should be removed, as it is not a supported scenario.