-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix HasFileLocalTypes check for constructed types #68386
Conversation
I would recommend each test to have a type check (either an |
Are you suggesting the test obtains the relevant type symbols and checks their types? |
That's what I was suggesting, but looking at the test file it looks like it's mostly doing that already (type check and check for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done with review pass (iteration 1)
@@ -3392,7 +3392,7 @@ public override void VisitNamespace(NamespaceSymbol symbol) | |||
public override void VisitNamedType(NamedTypeSymbol symbol) | |||
{ | |||
Debug.Assert(symbol.ContainingSymbol.Kind == SymbolKind.Namespace); // avoid unnecessary traversal of nested types | |||
if (symbol.AssociatedFileIdentifier is not null) | |||
if (symbol.IsFileLocal) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. I think this reads better/clearer :-)
src/Compilers/CSharp/Portable/Symbols/Metadata/PE/PENamedTypeSymbol.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done with review pass (iteration 4)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM Thanks (iteration 5) with a minor suggestion in PENamedTypeSymbol
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM Thanks (iteration 5)
Looking |
Done with review pass (commit 5). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (commit 6), assuming CI is passing
Closes #67208
Reviewed usages of HasFileLocalTypes and tried to add tests exercising each one.
Relates to file-types: #60819