Commit a819e63
fix(semantic): add bytes integer indexing type inference
Bytes indexing (b[0]) was returning UnknownType because the __getitem__
protocol stub lacks return type information. Add explicit bytes case in
InferIndexAccessType (matching the existing str pattern) to return int,
consistent with Python's bytes[int] → int behavior.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 8ce7a7b commit a819e63
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
779 | 779 | | |
780 | 780 | | |
781 | 781 | | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
782 | 788 | | |
783 | 789 | | |
784 | 790 | | |
| |||
0 commit comments