You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure what you would want to do in these cases since it is a nested type and the declaration requires the parent type as well. In my opinion it should probably return the declaration for only that nested class (and not the parents)... But that is up to you of course.
At a minimum you should probably throw a custom ArgumentException with a custom message.
If you remove types:
typeof(A.B<>.C<>).GetDeclaration()
It returns
"C<D, E>"
And that is definitely incorrect.
The text was updated successfully, but these errors were encountered:
Description
Just FYI your "Type.GetDeclaration()" extension fails for nested generic types. Example:
It currently throws an
InvalidOperationException
.I'm not sure what you would want to do in these cases since it is a nested type and the declaration requires the parent type as well. In my opinion it should probably return the declaration for only that nested class (and not the parents)... But that is up to you of course.
At a minimum you should probably throw a custom
ArgumentException
with a custom message.If you remove types:
It returns
"C<D, E>"
And that is definitely incorrect.
The text was updated successfully, but these errors were encountered: