- Crate:
qsc_fir_transforms
- Panic: monomorphize.rs:125, in
assert_no_reachable_generic
- Stage / profile: callable compile (
Context.compile(callable)), Base
- Message:
monomorphization left a generic callable `G` reachable in package PackageId(3)
from qdk import Context, TargetProfile
ctx = Context(target_profile=TargetProfile.Base)
ctx.eval("""
function Foo<'U>(x : 'U) : 'U { x }
function G<'T>() : Unit {
let y = Foo(1);
let _ = y + 1;
}
""")
ctx.compile(ctx.code.G)
qsc_fir_transformsassert_no_reachable_genericContext.compile(callable)), Basemonomorphization left a generic callable `G` reachable in package PackageId(3)