microsoft / qsharp-language

Official repository for design of the quantum programming language Q# and its core libraries
MIT License
235 stars 56 forks source link

Add support for BigInt ranges #132

Open Strilanc opened 2 years ago

Strilanc commented 2 years ago

I'd like to be able to write this:

for k in 0L..15L {
    ...
}

Currently this causes a compile error:

error QS0001: The type Int does not match the type BigInt

It should instead be equivalent to:

for k_helper in 0..15 {
    let k = IntAsBigInt(k_helper);
    ...
}