Files
c3c/test/test_suite7/lambda/lambda_checks.c3
2025-02-23 13:53:04 +01:00

14 lines
373 B
Plaintext

module test;
def 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
}