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.
Dernier runRéussi#125 · main · 16 min 13 s
0Étoiles
0Forks
40Issues
| 1 | // `demonitor` takes the pid and the `Down` subject `monitor` returned |
| 2 | // (issue #414); `monitor`'s type is unchanged. |
| 3 | |
| 4 | import std/process.{type Down, type Pid, type Subject, type proc} |
| 5 | |
| 6 | fn watch_then_forget :: pid: Pid -> Subject<Down> / <proc> |
| 7 | { |
| 8 | let down = process.monitor pid |
| 9 | process.demonitor pid down |
| 10 | process.demonitor_flush pid down |
| 11 | down |
| 12 | } |
| 13 | //~ TYPE watch_then_forget: fn(Pid) -> Subject<Down> / <proc> |
| 14 | |
| 15 | fn another_subject :: pid: Pid replies: Subject<Int> -> () / <proc> |
| 16 | { |
| 17 | process.demonitor pid replies |
| 18 | //~^ ERROR E0202 expected `Subject<Down>`, found `Subject<Int>` |
| 19 | } |