mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 20:11:17 +00:00
Fixes to lib7, added parallel test structure.
This commit is contained in:
14
test/test_suite7/lambda/lambda_checks.c3
Normal file
14
test/test_suite7/lambda/lambda_checks.c3
Normal file
@@ -0,0 +1,14 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user