Commit 8b14c28
fix(semantic): add bytes operator inference for concatenation, repetition, and comparison
Add bytes type handling to TypeInferenceService.TryInferBuiltinBinaryOp
for bytes+bytes (concat), bytes*int/int*bytes (repetition), and
bytes==bytes/bytes\!=bytes (equality). Add bytes case to
OperatorValidator.SupportsOperator for __add__, __mul__, __eq__, __ne__,
and __contains__. Remove bytes_operators.skip to enable integration test.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent f05e39e commit 8b14c28
3 files changed
Lines changed: 31 additions & 0 deletions
File tree
- src
- Sharpy.Compiler.Tests/Integration/TestFixtures
- Sharpy.Compiler/Semantic
- Validation
Whitespace-only changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
228 | 252 | | |
229 | 253 | | |
230 | 254 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
239 | 240 | | |
240 | 241 | | |
241 | 242 | | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
242 | 249 | | |
243 | 250 | | |
244 | 251 | | |
| |||
0 commit comments