Added type inference of bound variables.
o Added a test to verify trigger an error when the inferred type of a bound variable remains ambiguous
o fixed a case of type inferrence on bound variables where the information of a "dummy" declaration was discared