inhabitedness cache handles cycles incorrectly #44402
Labels
B-unstable
Blocker: Implemented in the nightly compiler and unstable.
C-bug
Category: This is a bug.
I-unsound
Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness
P-medium
Medium priority
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
In this example, I get an (incorrect) compilation error:
But if you comment out
test_a
, you don't. This is because the inhabitedness code, if it starts fromFoo
, incorrectly caches a result forBar
-- the result is incorrect becauseBar
did not fully exploreFoo
, since we found a cycle.Encountered while fixing #44137 -- I will fix en passante.
The text was updated successfully, but these errors were encountered: