Assertion failure on self-import
Given two files:
A.hs
module A where
import A
B.hs
module B where
import A
A
is correctly rejected:
$ ./bin/ghc-stage2 A
Module imports form a cycle:
module ‘A’ (A.hs) imports itself
B
raises an assertion failure:
$ ./bin/ghc-stage2 B
ghc-stage2: panic! (the 'impossible' happened)
GHC version 9.3.20211001:
ASSERT failed!
Build plan missing nodes:
PLAN: [UnresolvedCycle: [ModSummary {
ms_hs_hash = 696e340ec1c794d2136d0fc71d9fc54b
ms_mod = A,
ms_textual_imps = [(Nothing, Prelude), (Nothing, A)]
ms_srcimps = []
} []]]
Tested on master, commit e3701815.