
louise
Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.
Dernier runRéussi#1199 · main · 10 min 33 s
1Étoiles
0Forks
0Issues
| 1 | // The runtime's `random` handler refuses a negative count, on both |
| 2 | // backends (ADR 0036). |
| 3 | |
| 4 | import std/bytes |
| 5 | import std/io |
| 6 | import std/random.{type random} |
| 7 | |
| 8 | pub fn main :: -> () / <io, random> |
| 9 | { |
| 10 | io.println "{bytes.length (random.bytes 2)}" |
| 11 | io.println "never printed {bytes.length (random.bytes (-1))}" |
| 12 | } |
| 13 | //> 2 |
| 14 | //! panic: random.bytes: negative count -1 |