JakuJ / quantum-explorer

Bachelor's project: Compiler Explorer for Q#
https://qexplorer.herokuapp.com
GNU General Public License v3.0
3 stars 0 forks source link

Referencing hidden operations in user code shouldn't work #103

Open JakuJ opened 3 years ago

JakuJ commented 3 years ago

Referencing hidden, custom operations in user-written code actually works and breaks compilation 🙂 This issue has low priority, you basically have to be a developer of this app to actually know you can break the compiler this way. Also, you get the "There has been an issue while processing your request." message in production anyway, so no big deal.

Code to reproduce:

namespace Test {
    open Microsoft.Quantum.Intrinsic;

    @EntryPoint()
    operation Main(): Unit {
        using ((q, qs) = (Qubit(), Qubit[3])) {
            TagAllocation("wtf", true);
            I(q);
            ResetAll(qs);
        }
    }
}