function called through a non-compatible type