//# publish module 0x1.M { struct S { b: bool } a() { label b0: Self.b, u64>(); return; } b() { label b0: Self.f(); Self.c, bool>(); return; } c() { label b0: Self.c(); Self.d(); Self.e(); return; } d() { label b0: Self.b(); return; } e() { label b0: return; } f() { label b0: Self.g(); return; } g() { label b0: Self.f>(); return; } } // There are two disjoint loops in the resulting graph, but only one error // loop: f#T --> g#T --S--> f#T // loop: c#T1 --> c#T2 --> d#T --> b#T2 --S--> c#T1 //# publish module 0x1.M2 { struct S { b: bool } f() { label b0: Self.g(); return; } g() { label b0: Self.f>(); return; } } // loop: f#T --> g#T --S--> f#T // check: LOOP_IN_INSTANTIATION_GRAPH //# publish module 0x1.M3 { struct S { b: bool } a() { label b0: Self.b, u64>(); return; } b() { label b0: Self.f(); Self.c, bool>(); return; } c() { label b0: Self.c(); Self.d(); Self.e(); return; } d() { label b0: Self.b(); return; } e() { label b0: return; } f() { label b0: Self.g(); return; } g() { label b0: // Switched to just to isolate the loop Self.f(); return; } } // loop: c#T1 --> c#T2 --> d#T --> b#T2 --S--> c#T1