adding tests for type reference nesting