Skip to content

Better support for non-function type aliases #648

Open
@yanok

Description

@yanok

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3A lower priority bug or feature requesttype-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions