mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
- Distinct func type would not accept direct function address assign. #1287
This commit is contained in:
14
test/test_suite/distinct/distinct_function.c3t
Normal file
14
test/test_suite/distinct/distinct_function.c3t
Normal file
@@ -0,0 +1,14 @@
|
||||
module output;
|
||||
|
||||
def FnA = fn void(int*);
|
||||
distinct FnB = FnA;
|
||||
|
||||
fn void func(int*) {}
|
||||
|
||||
fn void main()
|
||||
{
|
||||
FnA a = &func;
|
||||
FnB b = (FnB)&func;
|
||||
FnB b2 = &func;
|
||||
FnB b3 = fn (int* x) {};
|
||||
}
|
||||
Reference in New Issue
Block a user