Check that declared types are instances of inferred.