Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better support for non-function type aliases #648

Open
yanok opened this issue Jun 1, 2023 · 0 comments
Open

Better support for non-function type aliases #648

yanok opened this issue Jun 1, 2023 · 0 comments
Labels
P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug

Comments

@yanok
Copy link
Contributor

yanok commented Jun 1, 2023

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.

@yanok yanok added P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug labels Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

1 participant