This repository was archived by the owner on Jun 17, 2022. It is now read-only.

Description
Taken from the README with fixed syntax:
closure rand_t() -> int;
fn secure_random() -> int {
return 42;
}
fn main() {
rand_t rand = secure_random;
}
Compiling fails:
[ERROR] incompatible types ::zztest::main::rand_t and ::zztest::main::secure_random
--> /home/lukas/src/misc/zztest/src/main.zz:8:5
|
8 | rand_t rand = secure_random;␊
| ^-------------------------^
|
= this expression is unprovable over incompatible types
--> /home/lukas/src/misc/zztest/src/main.zz:8:5
|
8 | rand_t rand = secure_random;␊
| ^-------------------------^
|
= rand := ::zztest::main::rand_t Uninitialized
--> /home/lukas/src/misc/zztest/src/main.zz:3:1
|
3 | fn secure_random() -> int {␊
| ...
6 | fn main() -> int {␊
| ^
|
= ::zztest::main::secure_random := ::zztest::main::secure_random Uninitialized