-
Notifications
You must be signed in to change notification settings - Fork 68
Closed
Labels
Description
Attempting use function with non-any
array parameter on typedef
/typeset
function with any
array, error is reported on function prototypes. No error reported if cell is used instead of array, or function with any
array parameter is used.
Compiles without error in 1.10, broke in 1.11.0.6798
.
typedef CallbackCell = function void (any cell);
typedef CallbackArray = function void (any array[4]);
public void OnPluginStart()
{
ReturnCallbackCell(CellAny); // no error
ReturnCallbackCell(CellInt); // no error
ReturnCallbackArray(ArrayAny); // no error
ReturnCallbackArray(ArrayInt); // error 100: function prototypes do not match
}
CallbackCell ReturnCallbackCell(CallbackCell callback)
{
return callback;
}
CallbackArray ReturnCallbackArray(CallbackArray callback)
{
return callback;
}
void CellAny(any cell) {}
void CellInt(int cell) {}
void ArrayAny(any array[4]) {}
void ArrayInt(int array[4]) {}