With the following code, RCA produces the expected error message but only on the entry point rather than on the line that produced the dynamic string (playground):
namespace MyQuantumProgram {
operation ApplyAndMeasure(op : Qubit => Unit, q : Qubit) : Bool {
op(q);
return MResetZ(q) == One;
}
@EntryPoint()
operation Main() : Result[] {
use q = Qubit();
let b = ApplyAndMeasure(H, q);
let s = b ? "One" | "Zero";
return [];
}
}
The is reported at Main() which is expected but missing from let s = b ? "One" | "Zero";
With the following code, RCA produces the expected error message but only on the entry point rather than on the line that produced the dynamic string (playground):
The is reported at
Main()
which is expected but missing fromlet s = b ? "One" | "Zero";