Skip to content

Conversation

@Evangelink
Copy link
Contributor

Fix #1077

I think that the method IsSameOrInherits should be updated to use IsSubclassOf instead of AssignableFrom to avoid some potential FPs (assignable checks also for cast not only direct inheritance).

@Evangelink Evangelink changed the title Beequivalentto basetype [GH-1077] Fix MemberPath so that it can exclude overriden members Jun 24, 2019
@Evangelink Evangelink force-pushed the beequivalentto-basetype branch from 5125149 to 1f5fb54 Compare June 24, 2019 13:12
@dennisdoomen dennisdoomen changed the title [GH-1077] Fix MemberPath so that it can exclude overriden members Fix MemberPath so that it can exclude overriden members (1077]) Jun 24, 2019
@dennisdoomen dennisdoomen changed the title Fix MemberPath so that it can exclude overriden members (1077]) Fix MemberPath so that it can exclude overriden members Jun 24, 2019
@Evangelink
Copy link
Contributor Author

@dennisdoomen What do you think about creating a new PR to change IsAssignableFrom to IsSubclassOf?

@dennisdoomen
Copy link
Member

What do you think about creating a new PR to change IsAssignableFrom to IsSubclassOf?

I don't quite get why. IsSameOrInherits implies that it'll return true if the type is the same or inherits from it and supports interfaces as well.

@Evangelink
Copy link
Contributor Author

Current implementation is probably good enough but IsAssignableFrom also handles cast. So if you have type A with property Foo and type B with the same property name and B has the implicit cast operator this would return true.

@dennisdoomen dennisdoomen merged commit fdc2c7d into fluentassertions:master Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Excluding not functioning on overriden linked property

3 participants