Prefix type names with global and use static TypeSyntax and NameSyntax instead of Parse(Type)Name#90339
Conversation
…x instead of Parse(Type)Name
|
Tagging subscribers to this area: @dotnet/interop-contrib Issue DetailsFixes #90299 There were a few places where we would use the type names without the global:: prefix that causes issues when there is another "System" symbol in the context. To avoid this, we can use a static TypeSyntax and NameSyntax for well-known types instead of calling ParseTypeName or ParseName and remembering to prefix "global::". Though of course now we need to remember to use these instead of ParseTypeName...
|
|
Looks like there's a few I missed, like Span and ThrowForHR. |
|
Still some code cleanup that can be done, but the generated code looks good and this should probably make it into 8. I'll do the follow up for 9. |
|
Failures are known |
Fixes #90299
There were a few places where we would use the type names without the global:: prefix that causes issues when there is another "System" symbol in the context. To avoid this, we can use a static TypeSyntax and NameSyntax for well-known types instead of calling ParseTypeName or ParseName and remembering to prefix "global::". Though of course now we need to remember to use these instead of ParseTypeName...