mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
14 lines
375 B
Plaintext
14 lines
375 B
Plaintext
module test;
|
|
alias Func = fn void (bool);
|
|
|
|
fn bool foo (String) => true;
|
|
fn void bar(Func func) => func(false);
|
|
|
|
fn void main()
|
|
{
|
|
Func funcX = &foo; // #error: Implicitly casting
|
|
bar(&foo); // #error: Implicitly casting
|
|
|
|
Func func = fn bool (String) { return true; }; // #error: which doesn't match
|
|
bar(fn bool (String) { return true; }); // #error: which doesn't match
|
|
} |