Syntax extension: fix error locations and fix typing of method arguments

The type of method arguments was not checked with respect to the method
parameter types!

Also, the error message locations was not always exact.