Skip to content

fix potential collision when selecting types that inherit from type from another assembly - #52

Merged
BenMorris merged 1 commit into
BenMorris:masterfrom
jsantha:fix/inherit-cross-assembly-select-type-collision
Aug 13, 2020
Merged

BenMorris merged 1 commit into
BenMorris:masterfrom
jsantha:fix/inherit-cross-assembly-select-type-collision

Conversation

@jsantha

@jsantha jsantha commented Apr 29, 2020

Copy link
Copy Markdown
Contributor

Currently, there is a problem when selecting types that inherit from a type that is defined in different assembly than the assembly we are selecting from.

The problem lies here TypeDefinitionExtensions.cs#L23 as simple MetadataToken comparison is not reliable when types from multiple assemblies are present (type metadata token seems to be unique only in assembly context).

I've changed an implementation of IsSubclassOf in a way it is aware of type assembly and added a test case representing the problem.

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.

2 participants