Skip to content

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