Consider namespace during collision detection#396
Conversation
|
It's hard to understand the motivation without an explanation, or example and no tests. FullName should include namespace I think? |
|
First: We have to switch from TargetAssemblyMainModule.GetType(...) to TargetAssemblyMainModule.Types.FirstOrDefault(...), because .GetType(...) internally accesses a dictionary with cached type names. After renaming a type, however, this cache is not updated. .Type.FirstOrDefault(...) accesses the real list of types. Secondly: There was an error in line 174, where only the name was checked, not the fullname. |
|
I see. Thanks. |
|
@vha-schleupen this has created a regression for nested types. For two nested types in different parent types, if the name and namespace is the same, it can pick the wrong nested type. This also needs to account the chain of declaring types and their names and namespaces. Issue #405 is because of this. |
|
I have a fix in 7137b8c, could you please check that it looks OK. |
|
@KirillOsenkov I have checked it. It looks good to me. 👍 |
No description provided.