tobogganSe connecter

louise

The Louise language: compiler, runtime, std, tooling

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

12 lignes · 345 octetsBrut · Historique
1// A table shares its values with every actor: only sendable values go in
2// (ADR 0073, `where Send<v>`).
3
4import std/process.{type proc}
5import std/ref.{type Ref}
6import std/table
7
8fn puts_a_ref :: counter: Ref<h, Int> -> () / <proc>
9{
10 let held = table.new ()
11 table.put held "counter" counter //~ ERROR E0704 `Ref<h, Int>` cannot be sent
12}