Skip to content
This repository was archived by the owner on Nov 13, 2026. It is now read-only.

Fix issues with instantiated generics - #1436

Merged
davidwrighton merged 3 commits into
dotnet:masterfrom
davidwrighton:fix_instantiated_issues
Jun 24, 2016
Merged

davidwrighton merged 3 commits into
dotnet:masterfrom
davidwrighton:fix_instantiated_issues

Conversation

@davidwrighton

Copy link
Copy Markdown
Member
  • IsFinal property not correctly implemented for MethodForInstantiatedType
  • GetFinalizer does not work if the type does not implement the finalizer directly, but instead inherits it from the parent type

- IsFinal property not correctly implemented for MethodForInstantiatedType
- GetFinalizer does not work if the type does not implement the finalizer directly, but instead inherits it from the parent type
@davidwrighton

Copy link
Copy Markdown
Member Author

@MichalStrehovsky PTAL

MetadataType typeInHierarchy = this;
while (typicalFinalizer.OwningType.GetTypeDefinition() != typeInHierarchy.GetTypeDefinition())
{
typeInHierarchy = (MetadataType)typeInHierarchy.BaseType;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: You can use MetadataBaseType to avoid the cast.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@MichalStrehovsky

Copy link
Copy Markdown
Member

👍

@davidwrighton
davidwrighton merged commit 05e6aac into dotnet:master Jun 24, 2016
@davidwrighton
davidwrighton deleted the fix_instantiated_issues branch June 24, 2016 21:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants