Added support for inheritance substitutions to typechecking pass
and also added test file.