the following things happen when you declare a constant to hold a pointer to foo.
// CRASH: implicit assignment of functions to constant
const func_pointer = foo;
// CRASH: implicit assignment of array of functions to constant
const func_pointers = [foo, foo];
// BUG: type error assumes functions are incompatible
// but error message lists the same signature twice,
const func_pointer_explicit : func(u16 in hl) = foo;
// BUG: type error assumes functions are incompatible
// but error message lists the same signature twice,
const func_pointers_explicit : [func(u16 in hl)] = [foo, foo];
The following assignments work (but now the func pointer needs to be casted back when invoking it)
const func_pointer_casted = foo as func;
const func_pointer_explicit_casted : func = foo as func;
const func_pointers_casted = [foo as func, foo as func];
const func_pointers_explicit_casted : [func] = [foo as func, foo as func];
Fix the crash on implicitly typed constants, and the failure to recognize function expressions that exactly conform to the constant's explicit type signature.
Given the following function:
the following things happen when you declare a constant to hold a pointer to foo.
The following assignments work (but now the func pointer needs to be casted back when invoking it)
Fix the crash on implicitly typed constants, and the failure to recognize function expressions that exactly conform to the constant's explicit type signature.