Commit 689c0b6
committed
Add missing codes for empty statement body
Fix RustPython#3704
Compared to previous version of `compile_program_single`, below two
codes are skipped when an empty body is given.
```rust
self.emit_constant(ConstantData::None);
self.emit(Instruction::ReturnValue);
```
Signed-off-by: snowapril <sinjihng@gmail.com>1 parent 2e1ed81 commit 689c0b6
1 file changed
+15
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
344 | 344 | | |
345 | 345 | | |
346 | 346 | | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
352 | 356 | | |
353 | | - | |
354 | | - | |
| 357 | + | |
355 | 358 | | |
| 359 | + | |
356 | 360 | | |
357 | 361 | | |
358 | | - | |
| 362 | + | |
| 363 | + | |
359 | 364 | | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | 365 | | |
367 | | - | |
368 | 366 | | |
369 | | - | |
370 | | - | |
| 367 | + | |
371 | 368 | | |
| 369 | + | |
372 | 370 | | |
373 | 371 | | |
374 | 372 | | |
| |||
0 commit comments