-
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
Follow up on addition of InternalSpecialType
#72704
Conversation
@jcouv, @dotnet/roslyn-compiler For the second review |
@@ -645,6 +645,8 @@ private static bool TryGetSpecialTypeMethod(SyntaxNode syntax, SpecialMember spe | |||
|
|||
public override BoundNode VisitTypeOfOperator(BoundTypeOfOperator node) | |||
{ | |||
Debug.Assert(node.Type.ExtendedSpecialType == InternalSpecialType.System_Type || |
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.
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.
I didn't follow. How do we get to this case (using
InternalSpecialType.System_Type
in typeof)?
This is a very common case of System.Type
defined in mscorlib. The type of typeof
is System.Type
.
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.
Resolved offline, what I was missing was that you can get a type marked as SpecialType = InternalSpecialType.System_Type
even though we don't have any special-type lookups in the code for it. We use well-known type lookup and generally happen to find the type from corlib, which will be marked as special type.
Thanks for clarification @AlekseyTs
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)
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 1)
Related to #72646.