Hey guys,

I've used D1 in the past and D1 seems to check for correct function
pointers. In D2 I can pass any function pointer to an function, for
example:

...
void example(void function(int, int) fp) {
...
}

...
void callback1(int x, int y) {
}
void callback2() {
}
...

example(&callback1); // Works in D1 and D2
example(&callback2); // Works in D2, but D1 says that example needs
an pointer (int, int) signature which is logical. D1 says "... (void
function(int, int)) does not match parameter types void function())"

But... why does D2 accept callback2? When I compile an application by
using debug mode in D2, the callback works... in release mode it
produces an "object.Error: Access Violation".

Is there any chance to check for correct function pointers in D2?

Reply via email to