support inherited and nested type variables