Skip to content

Conversation

@blairconrad
Copy link
Contributor

Fixes #34 and fixes #39.

I may have overstepped slightly. While working on #34, I noticed that my changes would affect the way open generic type errors were reported, so I included them in the work.
First, I added (quite a few) characterization tests so I could understand how things worked currently. Then I added the code to recurse through the type parameters and report on what couldn't be proxied, and which type was causing the problem. While I was at it, I ended up changing the type thrown from ProxyGenerator.CheckNotGenericTypeDefinition to GeneratorException (from ArgumentException) to match the error coming from DefaultProxyBuilder, and because I thought the new information about the type being proxied would remove the ambiguity that the argument name was trying to solve.

Of course, I understand that some of these decisions were not mine to make. If you disagree, I apologize for wasting your time and will quickly emend.

…c types (or their type parameters are).

Throwing GeneratorExceptions when to-be-proxied types are inaccessible (or their type parameters are).
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't bother checking the whole text of the message - the bits with the InteralsVisibleTo and the strong-naming aren't really relevant here, and are still fully checked in BasicInterfaceProxyTestCase.cs from before.

kkozmic added a commit that referenced this pull request Jan 10, 2014
34 inaccessible type parameters should give better error messsages
@kkozmic kkozmic merged commit 341f7ca into castleproject:master Jan 10, 2014
@kkozmic
Copy link
Contributor

kkozmic commented Jan 10, 2014

Merged. Sorry it took so long.

Thanks!

@blairconrad
Copy link
Contributor Author

Thanks. And please don't apologize. You're under no obligation to merge things in a particular time frame (or even at all!).

I hope my mention of you in the FakeItEasy/mocking SDK issue didn't come across as a "Hey, hurry up!"—that was not my intent . It's a privilege to have my issues and pull requests considered.

@blairconrad blairconrad deleted the 34-inaccessible-type-parameters branch January 11, 2014 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants