tobogganSe connecter

louise

Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.

14 lignes · 383 octetsBrut · Historique
1// An Int that is not a byte stops the actor, on both backends (the native
2// code checks for unwinding after `bytes.from_list`).
3
4import std/bytes
5import std/io
6
7pub fn main :: -> () / <io>
8{
9 io.println (debug (bytes.from_list [1, 255]))
10 let b = bytes.from_list [1, 256]
11 io.println ("never printed " <> debug b)
12}
13//> b"\x01\xff"
14//! panic: bytes.from_list: 256 is not a byte