Open
Description
Mockito currently just ignores non-function type aliases and works with the target type directly. Which is usually fine, unless the target type is private. We added support for mocking non-function type aliases some time ago, we should probably add support for referencing them properly as well.
This probably boils down to moving the if (type.alias != null)
branch out of if (type is FunctionType)
branch to the top-level of _typeReference
method. Not sure what analyzer gives us for the nested aliases case though... Is it possible to step through the aliases one by one? That needs to be checked.