mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
13 lines
206 B
D
13 lines
206 B
D
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/fail289.d(12): Error: cannot cast from function pointer to delegate
|
|
---
|
|
*/
|
|
|
|
alias void delegate() Dg;
|
|
void fun() {}
|
|
void gun()
|
|
{
|
|
Dg d = cast(void delegate())&fun;
|
|
}
|