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

[mono] Don't throw inheritance error on interfaces in GetCustomAttrs #33942

Merged
merged 1 commit into from
Mar 26, 2020

Conversation

CoffeeFlux
Copy link
Contributor

Fixes #33639

Looking at #7190, the .NET Core behavior here is strange and my changes in 0844cb7a6152 with the type checking may have been a mistake. I think this should be fine with the interface special-casing, but if deemed too great a concern I can revert that subset of my old changes. Additionally, if people come up with other scenarios where this might fail, I'll just revert until we can migrate to use a shared CustomAttribute implementation rather than try to play whack-a-mole.

@CoffeeFlux
Copy link
Contributor Author

@stephentoub can you check the test and make sure it's in the right place? Wasn't sure where to put it.

Copy link
Member

@akoeplinger akoeplinger left a comment

Choose a reason for hiding this comment

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

I think I'd put it somewhere after

public static void MultipleAttributesTest()

@CoffeeFlux
Copy link
Contributor Author

From what I could tell, the GetCustomAttributes tests were all in the file for their parent class since their behavior differs some (e.g. MemberInfo tests have a bunch), which is why I put it here but wasn't sure. Can move if you still think that's the best place for it, and I'll fix the style.

@akoeplinger
Copy link
Member

Can move if you still think that's the best place for it, [...]

I have no strong feeling on that one, the place you picked is probably fine too :)

Looking at dotnet#7190, the .NET Core behavior here is strange and my changes in dotnet@0844cb7a6152 with the type checking may have been a mistake. I think this should be fine with the interface special-casing, but if deemed too great a concern I can revert that subset of my old changes. Additionally, if people come up with other scenarios where this might fail, I'll just revert until we can migrate to use a shared CustomAttribute implementation rather than try to play whack-a-mole.
@CoffeeFlux CoffeeFlux merged commit 3df21ae into dotnet:master Mar 26, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

monovm & Type.GetCustomAttributes() doesn't like interfaces
3 participants