diff --git a/ShellCheck.cabal b/ShellCheck.cabal index 8afebe1..1226588 100644 --- a/ShellCheck.cabal +++ b/ShellCheck.cabal @@ -54,7 +54,7 @@ library containers >= 0.5.6 && < 0.7, deepseq >= 1.4.1 && < 1.5, Diff >= 0.4.0 && < 0.5, - fgl >= 5.7.0 && < 5.8.1.0, + fgl >= 5.7.0 && < 5.9, filepath >= 1.4.0 && < 1.5, mtl >= 2.2.2 && < 2.3, parsec >= 3.1.14 && < 3.2, diff --git a/src/ShellCheck/CFG.hs b/src/ShellCheck/CFG.hs index e0c6267..ebfeaa0 100644 --- a/src/ShellCheck/CFG.hs +++ b/src/ShellCheck/CFG.hs @@ -1301,7 +1301,9 @@ findPostDominators mainexit graph = asArray reversed = grev withExitEdges postDoms = dom reversed mainexit (_, maxNode) = nodeRange graph - asArray = array (0, maxNode) postDoms + -- Assume everything *not* reachable from 'mainexit' has every + -- node as postdominator. + asArray = listArray (0, maxNode) (replicate (maxNode+1) (nodes graph)) // postDoms return [] runTests = $( [| $(forAllProperties) (quickCheckWithResult (stdArgs { maxSuccess = 1 }) ) |])