compiler: Check the type in function declarations.