You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Basilisk fails union-of-members/enum equivalency in some case. #374
This was first reported against pyright but since this was a hole in the conformance suite as well and I opened an issue and PR about it here and discovered basilisk also failed in 1 case.
Refs #374 — confirmed live, now permanently measured.
This exact reproducer is now a case in the new type-torture scoreboard (benchmarks/torture/cases/enum_literal_expansion.py, runner benchmarks/torture/run_torture.py on bidirectionaltype-inference). Today's measured run confirms the false positive against a release binary built from HEAD:
error[assignment_compatibility]: Type mismatch: `x` is annotated `Literal[Answer.Yes, Answer.No]` (answer.yes | answer.no) but assigned answer
--> enum_literal_expansion.py:20:5
Scoreboard context (out-of-the-box defaults, methodology in the runner header): mypy, ty, and pyrefly pass the case; basilisk (1 FP), pyright (3 FPs), and zuban (2 FPs) fail it — consistent with the pyright-first history noted here. The case scores both directions of the enum-literal-expansion equivalence plus both assert_type forms, so a partial fix stays visible. Once fixed, the scoreboard's regression gate holds it fixed.
Not fixed yet — assignment_compatibility (and the assert_type path) still need the complete-union-of-members ≡ enum equivalence.
Activity
MelbourneDeveloper commentedon Aug 3, 2026
Refs #374 — confirmed live, now permanently measured.
This exact reproducer is now a case in the new type-torture scoreboard (
benchmarks/torture/cases/enum_literal_expansion.py, runnerbenchmarks/torture/run_torture.pyonbidirectionaltype-inference). Today's measured run confirms the false positive against a release binary built from HEAD:Scoreboard context (out-of-the-box defaults, methodology in the runner header): mypy, ty, and pyrefly pass the case; basilisk (1 FP), pyright (3 FPs), and zuban (2 FPs) fail it — consistent with the pyright-first history noted here. The case scores both directions of the enum-literal-expansion equivalence plus both
assert_typeforms, so a partial fix stays visible. Once fixed, the scoreboard's regression gate holds it fixed.Not fixed yet —
assignment_compatibility(and theassert_typepath) still need the complete-union-of-members ≡ enum equivalence.Merge upstream/main (Nimblesite#413 bidirectional inference); drop en…