Commit 2e4e7e0
Kristian Larsson
Lower unboxed bool calls
The boxing pass can see zero-argument __bool__ calls on numeric values
whose receiver has already been lowered to an unboxed representation. The
generic method-call path leaves that as a Dot on a raw receiver, which
QuickType cannot schema and which caused http2.client to fail on an
UNBOXED u32 receiver.
Handle that case during boxing by lowering numeric truthiness directly to
a raw nonzero comparison. The comparison stays in the unboxed
representation, and only the resulting Acton bool is boxed for the
surrounding expression.1 parent a7703da commit 2e4e7e0
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
487 | 487 | | |
488 | 488 | | |
489 | 489 | | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
490 | 496 | | |
491 | 497 | | |
492 | 498 | | |
| |||
0 commit comments